I have created a database, a table, and entries in that table through basic SELECT
and INSERT INTO
commands.
To view the entries I am using the basic query:
USE test1
SELECT * FROM orders
where test1 is Database and orders is Table name.
I can see the entries.
How can I store the results to a CSV?
With the query
SELECT * FROM orders
INTO OUTFILE '/path/to/file.csv'
FIELDS ESCAPED BY '""'
TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n'"
I am getting an error
Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'INTO'.