当前位置:Gxlcms > 数据库问题 > mysql中csv文件的导入导出

mysql中csv文件的导入导出

时间:2021-07-01 10:21:17 帮助过:16人阅读

导出例子:

select *from test
into outfile ‘D:test.csv‘
fields terminated by ‘,‘ optionally enclosed by ‘"‘ escaped by ‘"‘
lines terminated by ‘\r\n‘;

导入例子:
load data infile ‘D:test.csv‘
into table `test`
fields terminated by ‘,‘ optionally enclosed by ‘"‘ escaped by ‘"‘
lines terminated by ‘\n‘ ignore 1 lines;

实际操作中根据这个修改就行,有问题的地方还望指教~~

mysql中csv文件的导入导出

标签:into   sed   文件的   根据   例子   esc   from   lin   导入导出   

人气教程排行