如何将csv文件导入到mysql数据库呢,方法有很多但最简单粗暴的方法还是用sql语句啦,像下面这样。
1 LOAD DATA INFILE ‘csv文件路径‘ 2 INTO TABLE 数据表名 3 CHARACTER SET utf8 4 FIELDS TERMINATED BY ‘,‘ 5 ENCLOSED BY ‘"‘ 6 LINES TERMINATED BY ‘\n‘ 7 IGNORE 1 ROWS;
原文:http://www.cnblogs.com/xielefour/p/5605888.html