Skip to content

Instantly share code, notes, and snippets.

@FabricioFFC
Created March 22, 2011 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FabricioFFC/881878 to your computer and use it in GitHub Desktop.
Save FabricioFFC/881878 to your computer and use it in GitHub Desktop.
Mysql- Export select to CSV
SELECT 'example', CURTIME()
INTO OUTFILE '/tmp/result.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM YOUR_TABLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment