How to view catalog in MySQL
am 28.01.2006 16:05:43 von Kynn Jones
How can I query mysql to view the catalog? (By the catalog I mean the
special internal database that holds the meta-information about all
other databases in the system, including descriptions of all the tables
and their fields.) I know how to do this in psql, so I imagine there
is a similar facility in mysql. FWIW, my OS is Linux.
TIA,
kj
Re: How to view catalog in MySQL
am 28.01.2006 18:08:28 von Jonathan
Kynn Jones wrote:
> How can I query mysql to view the catalog? (By the catalog I mean the
> special internal database that holds the meta-information about all
> other databases in the system, including descriptions of all the tables
> and their fields.) I know how to do this in psql, so I imagine there
> is a similar facility in mysql. FWIW, my OS is Linux.
>
> TIA,
>
> kj
>
I'm not fimiliar with psql, but you might mean this:
show create table tablename;
see also:
http://dev.mysql.com/doc/refman/5.0/en/show-create-table.htm l
http://dev.mysql.com/doc/refman/5.0/en/show.html
Jonathan
Re: How to view catalog in MySQL
am 28.01.2006 19:01:46 von Markus Popp
Since MySQL 5.0, you'll find this information in the INFORMATION_SCHEMA
database.
Before MySQL 5.0, you can only use some pre-defined SHOW commands.
Markus