I have .csv file which I want to import to my database using the SQL syntax. This is how my .csv file looks like:
"john"
"james"
"peter"
"andrew"
"harry"
"king"
"hanny"
"charles"
So I ran this code in my SQL syntax:
LOAD DATA LOCAL INFILE 'C:/file.csv' INTO TABLE table FIELDS TERMINATED BY '' ENCLOSED BY '"' LINES TERMINATED BY '\n' (names)
But this is what I get when inserted:
john"
"james"
"peter"
"andrew"
"harry"
"king"
"hanny"
"charles
Please how do I make each name to be inserted in each row
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.