mysql中csv文件的导入导出
Posted SunshineKevin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql中csv文件的导入导出相关的知识,希望对你有一定的参考价值。
导出例子:
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文件的导入导出的主要内容,如果未能解决你的问题,请参考以下文章