Created
March 24, 2023 12:01
-
-
Save wipermail/67d9aef9ff8e69d5583d8fc64b67f025 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 order_id,product_name,qty | |
FROM orders | |
WHERE foo = 'bar' | |
INTO OUTFILE '/var/lib/mysql-files/orders.csv' | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n'; | |
Note: That syntax may need to be reordered to | |
SELECT order_id,product_name,qty | |
INTO OUTFILE '/var/lib/mysql-files/orders.csv' | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n' | |
FROM orders |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment