How to export data with column names?
am 13.02.2011 22:50:26 von mos
I want to use
select * into outfile "myfile.txt" from table1;
and have it export the data as tab delimited but with the column names. I
need the column names because the import utility will use that to create
the table in another (non-MySQL) database.
As it stands, I can't get the column names to appear.
Mike
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
RE: How to export data with column names?
am 14.02.2011 15:37:04 von Jerry Schwartz
>-----Original Message-----
>From: mos [mailto:mos99@fastmail.fm]
>Sent: Sunday, February 13, 2011 4:50 PM
>To: mysql@lists.mysql.com
>Subject: How to export data with column names?
>
>I want to use
>
>select * into outfile "myfile.txt" from table1;
>
>and have it export the data as tab delimited but with the column names. I
>need the column names because the import utility will use that to create
>the table in another (non-MySQL) database.
>
[JS] >mysql -hxxx -uyyy -pzzz -e "select * from table1" > myfile.txt
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
E-mail: jerry@gii.co.jp
Web site: www.the-infoshop.com
>As it stands, I can't get the column names to appear.
>
>Mike
>
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe: http://lists.mysql.com/mysql?unsub=jerry@gii.co.jp
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org