Created
August 10, 2018 17:15
-
-
Save kvn1234/d18c093ce7a8f72a5d41a79e6501b297 to your computer and use it in GitHub Desktop.
Find foreign keys from information_schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = 'table_name' AND REFERENCED_COLUMN_NAME = 'id' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment