0

我正在尝试将 CSV 文件导入 mysql 数据库。但查询给出错误。查询是:

LOAD DATA LOCAL INFILE ‘/last.csv’ INTO TABLE punjab FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘\r\n’ (newpoll, blockcode, halqa, pollnumber, pollstation, sex, area);

错误是

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '‘/last.csv’ INTO TABLE punjab FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘�' at line 1

有任何想法吗 ??谢谢

4

1 回答 1

1

您可以使用http://www.whereismyballot.com ;) 顺便说一下,您不应该引用字段名称

于 2013-04-30T09:45:15.530 回答