Find text in SQL Server Database Stored Procedure by Quary


In SQL Server if we want to search any text in our database stored procedure then execute below query in your SQL server management studio,

SELECT

DISTINCT

CAST(o.[name] AS VARCHAR(40)) AS objectname ,

o.type

FROM syscomments cinner

JOIN sysobjects o ON c.[id] = o.[id]

WHERE c.[text] LIKE ‘%Find Text%’

ORDER BY o.type

you just replace “Find Text” to your search string in query.

3 thoughts on “Find text in SQL Server Database Stored Procedure by Quary

Leave a comment