Last active
May 3, 2021 15:46
-
-
Save costr/9c7785fbde64c7193e353171c0ab9c39 to your computer and use it in GitHub Desktop.
Find SQL Table by 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
SELECT | |
COLUMN_NAME AS 'ColumnName' | |
,TABLE_SCHEMA AS 'TableSchema' | |
,TABLE_NAME AS 'TableName' | |
FROM | |
INFORMATION_SCHEMA.COLUMNS | |
WHERE | |
COLUMN_NAME LIKE '%COLUMN_NAME_HERE%' -- <-- REPLACE COLUMN FILTER | |
ORDER BY | |
TableSchema | |
,TableName | |
,ColumnName; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment