by cherryc
29. July 2011 15:41
Does it happen to you when you need to modify a table in the existing stored procedures in a large database, and that table is in a few stored procedures? Your first task is finding all the stored procedures to reference that table.
You can use the following to find them all.
-- This will find all the stored procedures which use table xyz in the current database
select distinct object_name(id)
from syscomments
where text like '%xyz%'
Happy coding!