SQL Server Find SQL Object Names within a Database


Find SQL Object Names within a database.

- April 20, 2015

Rest of the Story:

I was returning to an old database, and I wanted to find all instances of a particular column name.  The following SQL is a very fast way to output the object name (with additional data) for locating the item of interest.  Of course you can make more elaborate by filtering query.

SELECT sc.[name] AS column_name, so.[name] , 
    FROM syscolumns sc INNER JOIN sysobjects so ON sc.id=so.id 
    WHERE sc.[name] LIKE '%TestColumnName%'