This is an old revision of the document!



Home > linux > mysql > MysqlSaveOutputToFile | About

How to output the results of a request to a file

Use INTO OUTFILE like this:

SELECT order_id,product_name,qty
FROM orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';

contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code How to output the results of a request to a file (generated for current page)