Anyone have any success importing a csv file into MySQL?
Here's an example csv file:
Full name,Source - Name
John,Youtube
Jon,FB
Jacob,Twitter
Here's the code:
CREATE TABLE Person
(ID INT AUTO_INCREMENT primary key,
fullname CHAR not null,
sourcenam1 CHAR,
);
LOAD DATA LOCAL INFILE '/Users/...DDB.csv' INTO TABLE t1
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
(Full name, Source - Name)
But I get an error that says my syntax is wrong. Specifically, it is the following:
ERROR 1064 (42000): You have an error in your SQL syntax
I would like to not have to delete the column names to solve this problem.