Load data skipping first column
I am trying to import the data from... ftp://ftp.bls.gov/pub/time.series/la/la.area_type
mysql -e"CREATE TABLE test.area_type (area_type_code varchar(100), state_wide varchar(100))"
mysql -e"load data local infile 'la.area_type' into table test.area_type fields terminated by '\t' ignore 1 lines;"
The above load data command does import the second column but fails to import the first column. What should be the correct load data command to im开发者_JAVA百科port the data?
The csv seems to be in dos format, try
dos2unix la.area_type
and re-import again
精彩评论