This is a discussion on selecting field_name() / column_name() for INTO OUTFILE within the MySQL Database forums, part of the Database Forums category; Hi evry1; how can I include the fieldnames as part of a query result? I.e. I would like to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi evry1;
how can I include the fieldnames as part of a query result? I.e. I would like to add the field names as a first line in a SELECT INTO OUTFILE query. I thought of combining a UNION statement if there is no specific option but neither way can I find an option or function like column_names() to accomplish this. Any ideas anyone? Greatly appreciated. TIA CVH |
|
|||
|
On Apr 23, 9:25 am, CVH <please_do_...@spam.me> wrote:
> Hi evry1; > > how can I include the fieldnames as part of a query result? I.e. I would > like to add the field names as a first line in a > SELECT INTO OUTFILE > query. > > I thought of combining a UNION statement if there is no specific option but > neither way can I find an option or function like column_names() to > accomplish this. > > Any ideas anyone? Greatly appreciated. > > TIA > > CVH There's instructions on including headers here: http://dev.mysql.com/doc/refman/5.0/en/select.html Hope it helps |