Wednesday, 15 May 2013

how Import CSV to MySQL With the matched coloumn name in the mysql table -



how Import CSV to MySQL With the matched coloumn name in the mysql table -

i have table contact has 35 columns (name,age,mobile,nationality,gender,email,city,area,etc...),i cvs have name,mobile,nationality,city want match info mysql coloumn , insert cvs info specific coloumns in mysql .in cvs file have more 100k info hard insert 1 one

is there anyway me this

i tired not working

load info infile 'book1.csv' table t1 (@dummy,@dummy,name, @dummy, nationality, mobile1, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy,twon,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy,@dummy) fields terminated ',' enclosed '"' lines terminated '\n' ignore 1 lines;

this may not reply looking for, there faster ways of doing import if doing few times. rather doing code, can simple programme navicat or heidisql. both have easy utilize gui.

mysql csv import

No comments:

Post a Comment