Created
November 6, 2017 10:56
-
-
Save sevaldes/e16fd5c520a1f25935e1e1d47515de9b to your computer and use it in GitHub Desktop.
SQL query to find FK references to specific table
This file contains hidden or 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 | |
| information_schema.KEY_COLUMN_USAGE | |
| WHERE | |
| REFERENCED_TABLE_SCHEMA = 'objective_schema' | |
| AND REFERENCED_TABLE_NAME = 'objective_table' | |
| AND REFERENCED_COLUMN_NAME = 'objective_fk_column'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment