title: MySQL dump into CSV text files with column names at the top?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/262924/how-to-export-dump-a-mysql-table-into-a-text-file-including-the-field-names-a">How to export / dump a MySql table into a text file including the field names (aka headers or column names)</a>  </p>
  </blockquote>
  
  
  
  <p>I use this SQL snippet to dump a table into CSV text files:</p>
  
  <p>SELECT * FROM brand INTO OUTFILE "e:/brand.csv"
  FIELDS TERMINATED BY ',' ENCLOSED BY '"'
  LINES TERMINATED BY "\n";</p>
  
  <p>However this approach doesn't add the column names at the beginning of the CSV file. My question is how to select all the column / field names as well, just like what phpMyAdmin does when you export the table and select "Put fields names in the first row".</p>