Created
March 12, 2015 15:46
-
-
Save adrianosaaquino/97c7f505e3ab50235c78 to your computer and use it in GitHub Desktop.
MySql - Check foreign key existents
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
USE information_schema; | |
SELECT * FROM KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = 'table_name' AND REFERENCED_COLUMN_NAME = 'table_column' and TABLE_SCHEMA = 'schema_name'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment