使用load data infile导入数据
load data local infile '1.csv' into table role_sw character set gbk fields terminated by ',' enclosed by '"' lines terminated by "\r\n";
发现总有skipped数据,查看发现,使用MySQL Workbench建的表,默认第一列主键,导致重复列无法导入
alter table role_sw drop primary key;
这里我们不需要主键,删除即可。