SQL Server : Find SQL Object Names within a Database


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

Author

Admin

comments powered by Disqus

Categories

Recent Tweets

19 Types of Developers Explained dev.to/lpasqualis/19-…
Can't Afford Photoshop? Here Is The Best Free Drawing Software | Digital Trends digitaltrends.com/computing/best…
Retweeted by @dyardy Fun day christening Amazon’s latest wind farm. #RenewableEnergy https://t.co/cTxeXdsFop
Retweeted by @dyardy Hey C# peeps, we’re trying C# in browser with reference content. Try it here: docs.microsoft.com/dotnet/csharp/… reply with feedback /cc @LadyNaggaga
23 Amazing Vintage Photographs Taken Inside WWII Tank Factories ~ vintage everyday vintag.es/2017/10/23-ama…