Skip to content

Instantly share code, notes, and snippets.

@thebentern
Created December 24, 2015 13:44
Show Gist options
  • Save thebentern/fc6646168e783bdf0844 to your computer and use it in GitHub Desktop.
Save thebentern/fc6646168e783bdf0844 to your computer and use it in GitHub Desktop.
Find Column by name in Database
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 '%MyName%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment