Find Stored Procedure Related to Table in Database – Search in All Stored Procedure

----Option 1
SELECT DISTINCT so.name
FROM syscomments sc
INNER JOIN sysobjects so ON sc.id=so.id
WHERE sc.TEXT LIKE '%tablename%'
----Option 2
SELECT DISTINCT o.name, o.xtype
FROM syscomments c
INNER JOIN sysobjects o ON c.id=o.id
WHERE c.TEXT LIKE '%tablename%'

Comments

Popular posts from this blog

How to create RSS Feed in Asp.Net

Auto generate change scripts in SQL Server Management Studio SSMS for tables

HOW TO Use the NumericUpDown Control