Friday, December 10, 2010

Export a table into csv format

Here is an example to export data from MySQL into CSV File Format.
SELECT * INTO OUTFILE '/tmp/file_name.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM table_name;

0 comments:

Post a Comment