List:General Discussion« Previous MessageNext Message »
From:Naresh Sadhnani Date:August 6 2004 1:25pm
Subject:RE: Where are the Foreign Keys?
View as plain text  
You could also try 

SHOW KEYS FROM <dbname>.<tablename>

Should work.

Naresh

-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@stripped] 
Sent: 06 August 2004 14:06
To: mysql@stripped
Subject: Re: Where are the Foreign Keys?


Hi Ralf,

> as far as i know, there is only 1 way to extract the foreign key 
> relations
from a table: "show create table <tablename>".
> Are there any others?

The "comments" column  in SHOW TABLE STATUS is supposed
to list the FKs as well. A rather silly way of doing things, IMO, cause
you can't use the "comments" yourself anymore. Besides, the "comments"
field is waaay too short for a larger number of FKs.

So, as far as I know, SHOW CREATE TABLE is the only way.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL Server. Upscene Productions http://www.upscene.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1


-- 
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.

If you have received this email in error please notify the
originator of the message. This footer also confirms that this
email message has been scanned for the presence of computer viruses.

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of DA Group.


Thread
Where are the Foreign Keys?Ralf Müller6 Aug
  • Re: Where are the Foreign Keys?Martijn Tonies6 Aug
    • standard processing of metadataDebugasRu6 Aug
      • Re: standard processing of metadataJochem van Dieten6 Aug
RE: Where are the Foreign Keys?Naresh Sadhnani6 Aug
  • Re: Where are the Foreign Keys?Martijn Tonies6 Aug