Skip to content

Find all tables containing column with a certain name

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 '%LookingForThisColumn%'

 

Published inSQL

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *