Find all objects containing specific text in SQL Server
Want to find all T-SQL objects which reference a particular table name, column name, stored procedure?
SELECT DISTINCT a.[name]
FROM sysobjects a
INNER JOIN syscomments b on a.id = b.id
WHERE b.[text] LIKE '%[search-term]%'
Written by Tom Troughton
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#T-sql
Authors
getsetcode
101.3K
johnlbevan
6.142K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#