Is there a mysql query which returns the relationship between tables?
I tried show full columns from <atable>;
but it only returns meta data on columns excluding foreign keys
.
Thank you in advance.
Is there a mysql query which returns the relationship between tables?
I tried show full columns from <atable>;
but it only returns meta data on columns excluding foreign keys
.
Thank you in advance.
Well SHOW CREATE TABLE yourTable
should show the full create statement, which should include foreign key defintions. Beyond this, if you want to see a full graph of table relationships, you would probably have to use a tool outside of MySQL which specializes in doing that.
All of your keys are in the KEY_COLUMN_USAGE table and the type of constraint they are (primary key, Foriegn Key) should be in TABLE_CONSTRAINTS table