From: Martijn Tonies Date: March 17 2006 2:52pm Subject: Re: getting table metadata List-Archive: http://lists.mysql.com/mysql/195917 Message-Id: <03f801c649d2$6ecc9960$cd02a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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. As for system tables, MySQL 4.1 hardly has any. 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