Posted By

jarnaldich on 06/26/08


Tagged

mysql csv excel


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

heinz1959
wizard04
yoren
traktorist
jeremydouglass


Importing data from (Excel) CSV into MySQL


 / Published in: SQL
 

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

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

  1. LOAD DATA INFILE 'datafile.csv' INTO TABLE tbl_name
  2. FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\'
  3. LINES TERMINATED BY '
  4. '
  5. IGNORE 1 LINES;

Report this snippet  

You need to login to post a comment.