klenwell information services : MysqlOutfile

Mysql Interval

return to DevMysql

Examples

SELECT col1, coln INTO OUTFILE '/tmp/outfile.csv'
FIELDS TERMINATED BY ',' 
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM table 
WHERE 1 = 1


References

http://ariejan.net/2008/11/27/export-csv-directly-from-mysql/
http://dev.mysql.com/doc/refman/5.0/en/select.html