标签: sql mysql-workbench
我正在尝试将一个csv文件导入mysql工作台,但是第一行是表的标题,接下来的两行是空白。如何跳过前三行并开始在列标题处导入?
答案 0 :(得分:0)
更容易使用LOAD DATA,如下所示:
LOAD DATA INFILE 'MYFILENAME.CSV' INTO TABLE `mytablename` FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 3 LINES;