At 11:33 -0800 1/28/02, Michael Collins wrote:
>>From: Michael Collins [mailto:[EMAIL PROTECTED]]
>>Can "describe" be used to show columns from all tables in a database?
>
>At 9:56 AM -0800 1/28/02, Bruce Sandell wrote:
>>try mysqldump with the -d option.
>
>
>That was my first thought, but this does not give a result in the 
>nice tables wish describe uses, it returns the SQL statements for 
>creating the databases.
>
>I want the following for all tables in one shot?

That wouldn't work, because the output doesn't include
a column for table name. You wouldn't be able to interpret the output.

I'd write a script that issued SHOW TABLES, then a DESCRIBE for each
table.

>
>mysql> describe products;
>+-------------+----------------------+------+-----+---------+----------------+
>| Field       | Type                 | Null | Key | Default | Extra          |
>+-------------+----------------------+------+-----+---------+----------------+
>| ProductID   | smallint(5) unsigned |      | PRI | NULL    | auto_increment |
>| iLgImage    | smallint(6) unsigned | YES  |     | NULL    |                |
>| iSmImage    | tinyint(4) unsigned  | YES  |     | NULL    |                |
>| Description | varchar(255)         | YES  | MUL | NULL    |                |
>| ProductName | varchar(64)          | YES  | MUL | NULL    |                |
>+-------------+----------------------+------+-----+---------+----------------+
>5 rows in set (0.00 sec)
>
>--
>Michael
>__
>||| Michael Collins       |||
>||| Kuwago Web Services   |||      mailto:[EMAIL PROTECTED]
>||| Seattle, WA, USA      |||      http://www.lassodev.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to