一开始没加FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' 导致导出的csv没有进行分割
经过实践
mysql导出成csv 如下sql:
select * from tbl_agent_userinfo where C_IDCARD_NO in(select CUSTOMER_ID from result) into outfile "/tmp/1.csv" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
mysql导入csv: