Skip to content

Instantly share code, notes, and snippets.

@iammart
Created November 14, 2012 09:33
Show Gist options
  • Select an option

  • Save iammart/4071206 to your computer and use it in GitHub Desktop.

Select an option

Save iammart/4071206 to your computer and use it in GitHub Desktop.
[MYSQL] Dump results to CSV
SELECT column1, column2 FROM table
INTO OUTFILE '/tmp/data.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment