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;
Dec 10
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;
Permanent link to this article: https://blog.openshell.in/2010/12/export-a-table-into-csv-format/