Skip to content

Instantly share code, notes, and snippets.

@galvao
Created October 16, 2013 07:05
Show Gist options
  • Save galvao/7003758 to your computer and use it in GitHub Desktop.
Save galvao/7003758 to your computer and use it in GitHub Desktop.
Querying for Foreign Key Constraints in a MySQL Database
SELECT
*
FROM
information_schema.referential_constraints
WHERE
table_name='<table_name>'
AND constraint_schema='<database_name>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment