mysql 导入导出csv

导出:

select RESOURCE_ID_INT,RESOURCE_ID_CHAR,RESOURCE_TITLE from t_resource_info_wb
into outfile '/usr/local/test.csv'
fields terminated by ',' optionally enclosed by '"' escaped by '"'
lines terminated by '\r\n';

导入:

load data infile '/usr/local/test.csv'  
into table t_resource_info   
fields terminated by ','  optionally enclosed by '"' escaped by '"'  
lines terminated by '\r\n' (RESOURCE_ID_INT,RESOURCE_ID_CHAR,RESOURCE_TITLE);
(RESOURCE_ID_INT,RESOURCE_ID_CHAR,RESOURCE_TITLE)
按字段导入
上一篇:23种设计模式之访问者模式(Visitor)


下一篇:Docker实战(七)之为镜像添加SSH服务