To save a table into a CSV

 To save a table into a CSV (spreadsheet) file:


select * from TableName INTO OUTFILE '/var/lib/mysql-files/spreadsheet.csv' FIELDS ENCLOSED BY '"' TERMINATED by ';' ESCAPED BY '"' LINES TERMINATED BY '\n'


This will drop the file into the folder /var/lib/mysql-files/


Comments

Popular posts from this blog

dump a specific table

Tablespaces error

mysql says you can't login as root but you have definitely got the right password