gpt4 book ai didi

mysql - 加载数据 INFILE 错误 1064

转载 作者:可可西里 更新时间:2023-11-01 07:47:11 25 4
gpt4 key购买 nike

我正在运行这个 MySQL 命令:

LOAD DATA LOCAL INFILE 'books.csv'
INTO TABLE BOOK (Book_id, @dummy, Title, Publisher_name, @dummy, @dummy)
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES;

我收到一个错误:

ERROR 1064 (42000): 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
'FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r\n' IGNORE 1 LINES' at line 3

我在这里做错了什么?

最佳答案

http://dev.mysql.com/doc/refman/5.6/en/load-data.html显示语法。子句命名列位于 IGNORE 子句之后。

LOAD DATA LOCAL INFILE 'books.csv'
INTO TABLE BOOK
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES
(Book_id, @dummy, Title, Publisher_name, @dummy, @dummy);

关于mysql - 加载数据 INFILE 错误 1064,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19819206/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com