CSV Import to Using MySQL
By simanta
Use the below query in MySQL to import csv data to populate a table.
LOAD DATA LOCAL INFILE ‘path/to/csv/file’ INTO TABLE `tablename` FIELDS TERMINATED BY ‘;’ ENCLOSED BY ‘”‘ ESCAPED BY ‘\\’ LINES TERMINATED BY ‘\r\n’(`id`,`name`,`value`,`isactive`);
Tags: import, Load data
This entry was posted on May 14, 2008 at 5:07 am and is filed under MySQL. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.