List:General Discussion« Previous MessageNext Message »
From:Damon Card Date:October 19 2004 1:37am
Subject:Is it possible to export column headings with data?
View as plain text  
I am using SELECT statements to write some files via INTO OUTFILE.  This has
been working fine, but now I have the need to export the column headings
from the MySQL tables along with the column contents.  Is this possible?  If
so, how?

 

Ex.

SELECT stock, vin, color, mileage, price, cylinders, photo1 FROM cars WHERE
owner = 'dealer1' INTO OUTFILE 'c:/stock.csv' FIELDS TERMINATED BY ','
ENCLOSED BY '"' LINES TERMINATED BY '\r\n';



Thread
Is it possible to export column headings with data?Damon Card19 Oct