Ariel Sánchez Mora <[EMAIL PROTECTED]> wrote on 03/06/2006 03:12:20 PM:

> When using select into outfile, I can only get the table data, but I
> can't find how to include the column names. I haven't been able to 
> include the column names into the actual return of the query, and 
> they don't get stored in the .csv
> 
> Anyone know how to include the column names, table name, other info,
> as an actual answer from MySQL? I realize that when I use the 
> command line I can see the column names, but this is not the case 
> when using, for example, Delphi, and my real problem, when the 
> outfile is made.
> 
> I use SQLyog for exporting to csv and they do include the columns, 
> my bet is its some SQL option. The manual doesn't specify, at least 
> in the select syntax part.
> 
> Ariel
> 

As far as I am aware, INTO OUTFILE does not have a setting where you can 
tag the first line with the column names. You may need to use something 
else like the CSV storage engine or mysqldump to get the results you want. 
Or, as a last resort, you may have to create your own table export 
routine.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to