Created
November 17, 2017 15:49
-
-
Save alvarow/0e49b48c3d9d879699c44a57732c4256 to your computer and use it in GitHub Desktop.
MySQL SELECT into a CSV file
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 name,organization,orgid,associateid FROM client JOIN client_key WHERE client.client_ident = client_key.client_ident INTO OUTFILE '/tmp/clients.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