我想将csv文件导入mysql。我使用以下代码:
LOAD DATA local INFILE 'D:\20507.csv'
INTO TABLE rohit1
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS
但它不起作用;它只显示第一列记录? 帮我出去。
答案 0 :(得分:1)
试试这个:
LOAD DATA local INFILE 'D:/20507.csv' INTO TABLE rohit1 FIELDS TERMINATED
BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES;