0

我需要将一个CSV文件导入一个名为“colaints”的表中。该文件由表格分隔。我已经尝试过了:

load data local infile 'C:/Users/rocket/Documents/filipe ferminiano/processos/segmentacao/912013/coplaint.csv' 
into table crm_base.coplaints fields terminated by ' ' enclosed by '"';

但它不起作用。

4

1 回答 1

1

您需要将其\t用作制表符分隔文件的字段终止符。

load data local infile 
'C:/Users/rocket/Documents/filipe ferminiano/processos/segmentacao/912013/coplaint.csv'
into table crm_base.coplaints fields terminated by '\t' enclosed by '"';

http://dev.mysql.com/doc/refman/5.1/en/load-data.html

于 2013-01-09T14:36:55.723 回答