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';

Reply via email to