I have a CSV file that I need to upload in MySQL. The table desc is :
website varchar(500)
major_cat varchar(500)
sub_cat varchar(500)
ref varchar(500)
commision varchar(10)
additional_fee varchar(5)
shipping varchar(5)
Below is a CSV data example :
Amazon,All,All,AmazonAllAll,5%,10,12.36%
Angoor,All,All,AngoorAllAll,5%,0,12.36%
Big Basket,All,All,Big BasketAllAll,5%,0,12.36%
Car Khana,All,All,Car KhanaAllAll,5%,0,12.36%
I tried using the below load data infile query :
load data infile 'AAAAA Products.csv'
into table products
fields terminated by ','
lines terminated by '\n';
I get the below error
ERROR 1406 (22001): Data too long for column 'shipping' at row 1
Please help me with this. I'm stuck really bad.