Created
April 11, 2013 09:51
-
-
Save Elijen/5362108 to your computer and use it in GitHub Desktop.
Export from MySQL to CSV directly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT id, name, email INTO OUTFILE '/tmp/result.csv' | |
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' | |
ESCAPED BY ‘\\’ | |
LINES TERMINATED BY '\n' | |
FROM users WHERE 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment