Take the 2-minute tour ×

I have a csv file containg some data. And in my Sql Database I have a table with multiple column name. Now I want to update only one column by csv file. Thanks

share|improve this question
make your question a bit more clear. either you want to dump the data from csv file into mysql or any other. –  Chella Nov 22 '12 at 11:55
add comment

2 Answers

You can try like this:

-Import the csv file to a temp table
-Update your main table by joining with a temp table.
share|improve this answer
add comment

As stated by the MySQL Documentation you can do this

LOAD DATA INFILE 'mycsvdata.csv'
INTO TABLE mytable
( @csvfield1, @csvfield2 )
SET myTabField = @csvfield2;
share|improve this answer
add comment

Your Answer


