Home > AMP

Mysql 导入导出csv

导出csv

select * from test_info
into outfile ‘/tmp/test.csv’
fields terminated by ‘,’ optionally enclosed by ‘”‘ escaped by ‘”‘
lines terminated by ‘\n’;
导入csv

load data local infile ‘/tmp/test.csv’
into table test_info
CHARACTER SET utf8
fields terminated by ‘,’ optionally enclosed by ‘”‘ escaped by ‘”‘
lines terminated by ‘\n’;

请选择你看完该文章的感受:

0不错 0超赞 0无聊 0扯淡 0不解 0路过

随机文章:

两个地瓜
两个地瓜

分享
分享

小刺猬
小刺猬

我当爸爸啦
我当爸爸啦

黑龙江鹤岗分公司 “七参数法”解决规划中经纬度转换平面坐标难题
黑龙江鹤岗分公司 “七参数法”解决规划中经纬度转换平面坐标难题

壁虎的卵
壁虎的卵

发表评论