Skip to content

Instantly share code, notes, and snippets.

@Dalesjo
Created November 8, 2018 14:03
Show Gist options
  • Save Dalesjo/c114755d955b51ac9c6166d4c3afadbd to your computer and use it in GitHub Desktop.
Save Dalesjo/c114755d955b51ac9c6166d4c3afadbd to your computer and use it in GitHub Desktop.
Find all column with a specific name, and what table they recide in.
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 '%Trailer%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment