I'm using the MySQL LOAD DATA LOCAL INFILE command to load a tab delimited text file. But when I include the column list I get an error code 1064.
LOAD DATA LOCAL INFILE '/myfile.txt'
INTO TABLE mytable
(column1, column2, column3)
FIELDS TERMINATED by '\t'
LINES TERMINATED BY '\n'
IGNORE 10 LINES;
The non-column version works:
LOAD DATA LOCAL INFILE '/myfile.txt'
INTO TABLE mytable
FIELDS TERMINATED by '\t'
LINES TERMINATED BY '\n'
IGNORE 10 LINES;
What is causing the syntax error?