List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 28 2002 7:46pm
Subject:RE: describe all tables
View as plain text  
At 11:33 -0800 1/28/02, Michael Collins wrote:
>>From: Michael Collins [mailto:mcollins@stripped]
>>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:mcollins@stripped
>||| Seattle, WA, USA      |||      http://www.lassodev.com

Thread
Selecting boundary dates for a given week using date/time functions?Chris Cooper26 Nov
  • Re: Selecting boundary dates for a given week using date/time functions?Kodrik26 Nov
  • Re: Selecting boundary dates for a given week using date/timefunctions?Anvar Hussain K.M.26 Nov
    • Re: Selecting boundary dates for a given week using date/timefunctions?Chris Cooper26 Nov
  • Mac OS X and MySQL 3.23.45Michael Collins26 Nov
    • Re: Mac OS X and MySQL 3.23.45Erik Price26 Nov
      • Re: Mac OS X and MySQL 3.23.45Michael Collins26 Nov
        • Re: Mac OS X and MySQL 3.23.45Erik Price26 Nov
          • Mac OS X and MySQLMichael Collins26 Nov
            • Re: Mac OS X and MySQLSinisa Milivojevic26 Nov
RE: Mac OS X and MySQLMichael Collins26 Nov
RE: Mac OS X and MySQLjohn26 Nov
  • RE: Mac OS X and MySQLPaul DuBois26 Nov
    • Re: Mac OS X and MySQLErik Price26 Nov
RE: Mac OS X and MySQLMichael Collins26 Nov
RE: Mac OS X and MySQLjohn26 Nov
  • Re: Mac OS X and MySQLNDPTAL8527 Nov
    • Re: Mac OS X and MySQLMichael Collins27 Nov
    • RE: Mac OS X and MySQLjohn27 Nov
  • RE: Mac OS X and MySQLPaul DuBois27 Nov
    • describe all tablesMichael Collins28 Jan
  • Re: describe all tablesGerald Clark28 Jan
RE: describe all tablesMichael Collins28 Jan
  • RE: describe all tablesJames Montebello28 Jan
  • RE: describe all tablesPaul DuBois28 Jan
    • RE: describe all tablesMichael Collins28 Jan
Re: describe all tablesAndy Ingham28 Jan
Re: describe all tablesGerald Clark28 Jan
Re: describe all tablesMichael Collins28 Jan