我收到以下用于批量插入的SQL命令的错误。
BULK INSERT libra.faculty
FROM 'd\:faculty.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
);
以下是错误消息:
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 'BULK
INSERT libra.faculty
FROM 'd:\faculty.csv'
WITH
(
FIELDTERMINATOR = ',',
RO' at line 1
答案 0 :(得分:2)
使用LOAD DATA INFILE代替BULK INSERT
答案 1 :(得分:0)
LOAD DATA INFILE'd:faculty.csv'INTO TABLE libra.faculty FIELDS终止',''终止于'\ n'