首页 > 数据库技术 > 详细

mysql中csv文件的导入导出

时间:2017-06-26 09:42:19      阅读:258      评论:0      收藏:0      [点我收藏+]

导出例子:

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文件的导入导出

原文:http://www.cnblogs.com/sunshinekevin/p/7078947.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!