List:General Discussion« Previous MessageNext Message »
From:Jay Blanchard Date:June 5 2002 3:05pm
Subject:RE: \T QUESTION
View as plain text  
[snip]
IS it possible to export a query from mysql in a specific format.
I created a query-     SELECT id,title,class,grade FROM semester1; \T
semester1
but it exported the query in a table form.

Can anyone tell me if you can export the query in another format----Tab
delimited,cvs etc.
[/snip]

from http://www.mysql.com/doc/S/E/SELECT.html

SELECT stuff INTO OUTFILE "/tmp/result.csv"
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY "\n"
FROM test_table;

This will generate a CSV file

HTH!

Jay


Thread
\T QUESTIONJoshua Richards5 Jun
  • RE: \T QUESTIONJay Blanchard5 Jun