List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:March 17 2006 3:50pm
Subject:Re: getting table metadata
View as plain text  
Hello Yves,

> > > is it possible to get information about tables by doing queries on
some
> >
> > system
> >
> > > tables? I am using mysql version 4.1.11 on debian sarge.
> > >
> > > In my case I need to know which columns (names and types) a table has,
> > > and
> >
> > how
> >
> > > the primary key is defined.
> > >
> > > How can I get this information out of mysql by only using sql ?
> >
> > Have a look at the SHOW commands in the documentation.
>
> I know about the "show create table ..." but it doesn't really satisfy my
> needs... Is there really no other way apart of parsing "create table"
> statements?
>
> (I needed to this with firebird, and found all I could dream of in the
RDB$
> tables)

As I said -- take  a look at the SHOW commands in the documentation :-)

There's "show columns" for example.

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

Thread
getting table metadataYves Glodt17 Mar
  • Re: getting table metadataMartijn Tonies17 Mar
    • Re: getting table metadataYves Glodt17 Mar
      • Re: getting table metadataКосов Евгений17 Mar
      • RE: getting table metadataGordon17 Mar
  • Re: getting table metadatamysql17 Mar
  • Re: getting table metadataMartijn Tonies17 Mar
    • Re: getting table metadataYves Glodt17 Mar