How to find specific column in SQL Server database?

Viewed 41946

Is there any way or tool in SQL Server 2016 to find a column in the entire database based on the name?

Example: find ProductNumber and it shows you all the table(s) that have it

5 Answers
SELECT
so.name "table name", 
sc.name "column name"
FROM sysobjects so
INNER JOIN syscolumns sc
ON so.id = sc.id
WHERE --so.type='U'

--and

sc.name like '%ProductN%'
order by so.name asc  
Related