describe table + write the output in a file

Dear all,

I try to write the output of a describe table to a file that I need to cre=
ate.

I've tried : mysql> describe table > '/path/to/file'; but without success.

Can anybody tell me how to do this?

Thanks a lot,

Etienne.


This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules [at] m.gmane.org
Etienne Orliac [ Mo, 17 Mai 2004 14:26 ] [ ID #44049 ]

Re: describe table + write the output in a file

On Mon, 17 May 2004, Etienne Orliac wrote:

> Dear all,
>
> I try to write the output of a describe table to a file that I need to create.
>
> I've tried : mysql> describe table > '/path/to/file'; but without success.
>
> Can anybody tell me how to do this?
>
> Thanks a lot,
>

You have two options, depending on if you want to do it from the shell or
from the interactive client.

shell:

$ mysql -e "DESCRIBE db.table" > /path/to/file

client:

mysql> \T '/path/to/file'
mysql> DESCRIBE table;
mysql> \t

You will get some clutter in the second example, however.

--
Tobias Asplund <tobias [at] mysql.com>
Trainer and Consultant, Sweden
MySQL AB http://www.mysql.com

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules [at] m .gmane.org
Tobias Asplund [ Mo, 17 Mai 2004 14:48 ] [ ID #44050 ]

Re: describe table + write the output in a file

Hello Etienne,

> Dear all,
>
> I try to write the output of a describe table to a file that I need to
> create.
>
> I've tried : mysql> describe table > '/path/to/file'; but without success.
>
> Can anybody tell me how to do this?

Two ways come to mind:

1. Within the mysql client program:

mysql> tee file
mysql> describe table;
mysql> exit

cat file

2. From the command line:

mysqlshow database table > file

Regards,

Simon Taylor
--
Unisolve Pty Ltd - Melbourne, Australia
+61 3 9568 2005


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules [at] m .gmane.org
Simon Taylor [ Di, 18 Mai 2004 02:04 ] [ ID #44051 ]

Re: describe table + write the output in a file

On Mon, 17 May 2004, Etienne Orliac wrote:

> Dear all,
>
> I try to write the output of a describe table to a file that I need to create.
>
> I've tried : mysql> describe table > '/path/to/file'; but without success.
>
> Can anybody tell me how to do this?
>
> Thanks a lot,
>

You have two options, depending on if you want to do it from the shell or
from the interactive client.

shell:

$ mysql -e "DESCRIBE db.table" > /path/to/file

client:

mysql> \T '/path/to/file'
mysql> DESCRIBE table;
mysql> \t

You will get some clutter in the second example, however.

--
Tobias Asplund <tobias [at] mysql.com>
Trainer and Consultant, Sweden
MySQL AB http://www.mysql.com

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules [at] m .gmane.org
Tobias Asplund [ Mo, 17 Mai 2004 14:48 ] [ ID #180600 ]

Re: describe table + write the output in a file

Hello Etienne,

> Dear all,
>
> I try to write the output of a describe table to a file that I need to
> create.
>
> I've tried : mysql> describe table > '/path/to/file'; but without success.
>
> Can anybody tell me how to do this?

Two ways come to mind:

1. Within the mysql client program:

mysql> tee file
mysql> describe table;
mysql> exit

cat file

2. From the command line:

mysqlshow database table > file

Regards,

Simon Taylor
--
Unisolve Pty Ltd - Melbourne, Australia
+61 3 9568 2005


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules [at] m .gmane.org
Simon Taylor [ Di, 18 Mai 2004 02:04 ] [ ID #180601 ]
Datenbanken » gmane.comp.db.mysql.perl » describe table + write the output in a file

Vorheriges Thema: Problem !!!
Nächstes Thema: describe table + write the output in a file