Exporting table data.

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

Exporting table data.

Postby bhanu » Sun May 01, 2005 11:15 pm

How to add column names with data while exporting table contents to text file using SELECT * INTO OUTFILE "sample.txt" FROM table_name; in MySQL.
bhanu
 

Postby Damon » Tue May 03, 2005 9:56 am

Hi,

I believe you'll have to retrieve the column names with an additional SELECT command, and then write them out to the file manually. Alternatively, have a look at the following: http://www.issociate.de/board/post/1492/Exporting_Column_Names_Questions.html

HTH,
Damon
Damon Chandler
Editor-in-Chief
C++Builder Developer's Journal
http://bcbjournal.com
User avatar
Damon
BCBJ Editor and Admin
BCBJ Editor and Admin
 
Posts: 285
Joined: Wed May 26, 2004 11:25 pm
Location: Stillwater, OK, USA


Return to Technical

Who is online

Users browsing this forum: No registered users and 21 guests

cron