Skip to content

Instantly share code, notes, and snippets.

@davidromani
Last active October 19, 2016 14:14
Show Gist options
  • Save davidromani/2955007 to your computer and use it in GitHub Desktop.
Save davidromani/2955007 to your computer and use it in GitHub Desktop.
Export MySQL table into CSV
SELECT * INTO OUTFILE 'result.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM <table>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment