Skip to content

Instantly share code, notes, and snippets.

@kontur
Created April 7, 2013 20:08
Show Gist options
  • Save kontur/5332271 to your computer and use it in GitHub Desktop.
Save kontur/5332271 to your computer and use it in GitHub Desktop.
MySQL CLI command to create csv view from select
SELECT *
FROM test
INTO OUTFILE '/tmp/test.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