Skip to content

Instantly share code, notes, and snippets.

@lukmdo
Created December 10, 2009 21:51
Show Gist options
  • Save lukmdo/253721 to your computer and use it in GitHub Desktop.
Save lukmdo/253721 to your computer and use it in GitHub Desktop.
MySQL export data to CSV
SELECT * INTO OUTFILE '/tmp/output.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM table_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment