尝试加载csv文件。
我可以毫无问题地加载此查询:
LOAD DATA LOCAL INFILE 'C:/Users/ovoJa/Downloads/VEN01_527.csv'
INTO TABLE venom
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
(status, appid, phone, year, firstname, lastname, address, make, model, city, state, zip, count);
如果我尝试向该语句添加IGNORE 1 ROWS以跳过标题行,则会出现语法错误。
LOAD DATA LOCAL INFILE 'C:/Users/ovoJa/Downloads/VEN01_527.csv'
INTO TABLE venom
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
(status, appid, phone, year, firstname, lastname, address, make, model, city, state, zip, count)
IGNORE 1 ROWS;
答案 0 :(得分:0)
IGNORE 1 ROWS必须排在列列表之前。 – Barmar(来源)