load data infile 'D:/yaoding/gitDataSource/ceeasPython/sqlFiles/insertCollegeCutoff.txt' ignore into table college_cutoff fields terminated by ',' enclosed by '"' lines terminated by '\r\n' (`COLLEGEID`,`PROVINCE`,`GENERA`,`BATCH`,`YEAR`,`HSCORE`,`ASCORE`,`CSCORE`,`NUMBER`);
如果报secure_file_priv的问题先看
show variables like '%secure%';
修改my.ini
secure_file_priv=d:\
通过load data infile 导入txt文件,windows上的换行符是\r\n,字段分隔符是",ignore into table 忽略唯一索引
详细内容参看http://hunan.iteye.com/blog/752606