Published on

Find Tables by Column names in SQL Server

Authors

Find Tables by column names

While I was working on large legacy SQL server database I always wanted to find the Tables which has some columns. Below is the query I usually used to find the Tables by Column names.

SELECT c.name AS ColumnName, t.name AS TableName
FROM sys.columns c
JOIN sys.tables t ON c.object_id = t.object_id
WHERE c.name LIKE 'column_name';