Return to Snippet

Revision: 6957
at June 26, 2008 02:39 by jarnaldich


Initial Code
LOAD DATA INFILE 'datafile.csv' INTO TABLE tbl_name
FIELDS TERMINATED BY ','  ENCLOSED BY '"' ESCAPED BY '\\'
LINES TERMINATED BY '
'
IGNORE 1 LINES;

Initial URL
http://dev.mysql.com/doc/refman/5.0/en/load-data.html

Initial Description
Imports data from CSV (excel-compatible format) into MySQL. Also check the mysqlimport utility and the complementary SELECT ... INTO OUTFILE.

Initial Title
Importing data from (Excel) CSV into MySQL

Initial Tags
mysql, csv, excel

Initial Language
SQL