08 March 2011

How to find all of the foreign keys in MySQL?

Select
*
From Information_Schema.Table_Constraints
Where constraint_schema = 'YOUR_SCHEMA_NAME' And
constraint_type = 'FOREIGN KEY'
Order By constraint_name Asc, table_name Asc;

No comments: