You are here: Re: [ot] listing foreign keys in mySQL on InnoDB « PHP Programming Language « IT news, forums, messages
Re: [ot] listing foreign keys in mySQL on InnoDB

Posted by Erwin Moller on 01/25/07 10:15

Erwin Moller wrote:

<snip>
> I must be missing something completely in the docs. :-/
> How can I ask mysql which Foriegn Keys it has?
>

Hi,

In case somebody wants to see all Foreign Keys, I found place where they are
listed, be it in a userunfriendly way:

Just connect to:
- information_schema (it should be in any mySQL database)
- check the table TABLE_CONSTRAINTS

It lists all CONSTRAINTS. The column CONSTRAINT_TYPE will contain stuff like
'FOREIGN KEY' or 'PRIMARY KEY'.
Quite straightforward.
(My current knowledge of mysql is too meager to say if anybody in a shared
environment can read this table.)

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация