Load Delimited Data into MySQL

How to load Data from a CSV or any delimited file to MySQL:

LOAD DATA LOCAL INFILE ‘/path/to/file/name’ INTO TABLE `tablename` FIELDS TERMINATED BY ‘,’ LINES TERMINATED BY ‘\n’;

Keeping in mind that the delimited used here is , so FIELDS TEMINATED BY ‘,’

You can change the delimiter to any thing your data have.

Share

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

WordPress Themes