Last active
November 17, 2022 12:32
-
-
Save AndrewChamp/dab596f1f902efe980c5ff261b015a17 to your computer and use it in GitHub Desktop.
Search Database Tables for Column Name
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
# SEARCH DATABASE TABLES FOR COLUMN NAME | |
SELECT | |
table_name, | |
column_name, | |
data_type, | |
ordinal_position | |
FROM | |
INFORMATION_SCHEMA.COLUMNS | |
WHERE | |
table_schema = 'change_database_name' | |
AND column_name LIKE '%change_column_name%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment