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

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 '\r\n'

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 '\r\n';

猜你喜欢

转载自www.cnblogs.com/xiaobaibailongma/p/12110481.html