LOAD DATA INFILE
'c:\sample data.csv' INTO TABLE
companies(company_name,company_description) FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n';
答案 0 :(得分:0)
您可以在提及terminated by ...
名称之前省略column
语句或使用。
示例1 :
LOAD DATA INFILE
'c:\sample data.csv' INTO TABLE
companies(company_name,company_description);
示例2 :
LOAD DATA INFILE
'c:\sample data.csv' INTO TABLE
companies
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n'
(company_name,company_description);
请参阅文档: