List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:January 28 2002 8:00pm
Subject:Re: describe all tables
View as plain text  
You can write a shell script that does:
mysqlshow database, and then loops throught the tables returned doing:
mysqlshow database table


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?
>
> 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)
>


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