Created
October 17, 2017 23:53
-
-
Save Dillie-O/d707ab9aab1730cbfa241fae1deb9347 to your computer and use it in GitHub Desktop.
[Find Tables with Column] Finds all tables with column names matching input #sql
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 c.name AS ColName, t.name AS TableName | |
FROM sys.columns c | |
JOIN sys.tables t ON c.object_id = t.object_id | |
WHERE c.name LIKE '%MyCol%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment