mysql output csv file

In : mysql, Posted by admin on Oct.10, 2008

Here is the code to output result to csv file.

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

Tags :

 
close Reblog this comment
blog comments powered by Disqus