mysql导入导出csv文件

mysql导出csv文件

语法块

`select block`
into outfile `/path/of/file`
fields terminated by ',' optionally enclosed by '"' escaped by '"'
lines terminated by '\r\n';

例子

select * from test_info
into outfile '/tmp/test.csv'
fields terminated by ',' optionally enclosed by '"' escaped by '"'
lines terminated by '\r\n';

mysql导入csv文件

语法块

load data infile '/path/of/file'
into table `/name/of/table`
fields terminated by ','  optionally enclosed by '"' escaped by '"'
lines terminated by '\r\n';

例子

load data infile '/tmp/test.csv'
into table test_info
fields terminated by ','  optionally enclosed by '"' escaped by '"'
lines terminated by '\r\n';
阅读更多
文章标签: mysql csv
个人分类: 杂文
想对作者说点什么? 我来说一句

javaCSV导入导出

2014年01月22日 2KB 下载

CSV导入和导出程序

2007年12月27日 47KB 下载

没有更多推荐了,返回首页

不良信息举报

mysql导入导出csv文件

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭