describe table + write the output in a file

describe table + write the output in a file

am 17.05.2004 14:26:19 von Etienne Orliac

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 @m.gmane.org

Re: describe table + write the output in a file

am 17.05.2004 14:48:12 von Tobias Asplund

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
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@m .gmane.org

Re: describe table + write the output in a file

am 17.05.2004 14:48:12 von Tobias Asplund

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
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@m .gmane.org

Re: describe table + write the output in a file

am 18.05.2004 02:04:20 von Simon Taylor

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@m .gmane.org

Re: describe table + write the output in a file

am 18.05.2004 02:04:20 von Simon Taylor

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@m .gmane.org