Created
August 4, 2014 13:19
-
-
Save mos3abof/54c378664bec9d93768f to your computer and use it in GitHub Desktop.
List tables referencing 'my_table' in 'my_database' MySQL database
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 | |
| table_name | |
| from | |
| information_schema.KEY_COLUMN_USAGE | |
| where | |
| table_schema = 'my_database' | |
| and referenced_table_name = 'my_table'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment