mysql——某表所有记录的导出和导入——csv文件

时间:2021-08-28 04:46:18

select * from cr01
into outfile C:/Users/del/Desktop/table1_data.csv
character set gb2312
fields terminated by , optionally enclosed by " escaped by "
lines terminated by rn

select * from cr01; delete from cr01;

load data infile C:/Users/del/Desktop/table1_data.csv into table cr01 character set gb2312 fields terminated by , optionally enclosed by " escaped by " lines terminated by rn;

mysql——某表所有记录的导出和导入——csv文件