Monday, February 2, 2009

load csv to mysql from local file

LOAD DATA LOCAL INFILE '[path to your csv]'
INTO TABLE [table to import into, must be created before running with proper columns]
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
([field 1], [field 2], [field 3], [...]);

link to original article
Post a Comment