Wednesday, April 29, 2009

Import CSV file directly into MySQL

You can then import it into a MySQL table by running:


 


#load data local infile 'file.csv' into table tablename


fields terminated by ','


enclosed by '"'


lines terminated by '\n'


(field1, field2, field3)

No comments:

sanjay's shared items

My Blog List