List:General Discussion« Previous MessageNext Message »
From:George Law Date:May 3 2006 6:53pm
Subject:RE: EXPORTING results to CSV
View as plain text  
try : 

select .....  into outfile '/tmp/t3.csv' FIELDS TERMINATED BY ','  LINES
TERMINATED BY '\n' from table where .....

This will create a file in the /tmp directory on the DB server itself

this doesn't do the column headings and your output file cannot already


-----Original Message-----
From: Cummings, Shawn (GNAPs) [mailto:shawn@stripped] 
Sent: Wednesday, May 03, 2006 2:45 PM
To: Mysql General (E-mail)
Subject: EXPORTING results to CSV

Is there a way to export the results to a text file (comma-delimited 

ie, SELECT * FROM TABLE >> test.txt ; (obviously this doesn't work)  :)

MySQL General Mailing List
For list archives:
To unsubscribe:

EXPORTING results to CSVGNAPs)3 May
  • Re: EXPORTING results to CSVMartijn Tonies3 May
RE: EXPORTING results to CSVGeorge Law3 May