Forked from AndrewChamp/search_database_tables_for_column_name.sql
Created
November 17, 2022 12:32
-
-
Save grim-reapper/3dd53025838d5e21fa4e59ea44205426 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