In this post, I will explain how to find Stored Procedures & Views with containing text in SQL server database using SQL query.
To find Stored Procedures & Views which contains given text in SQL server we need to write a query using SYS.SQL_MODULES.
To find Stored Procedures & Views which contains given text in SQL server we need to write a query using SYS.SQL_MODULES.
DECLARE @Parameter VARCHAR(100)
SET @Parameter = 'employee'
SELECT *
FROM SYS.SQL_MODULES
WHERE DEFINITION LIKE '%' + @Parameter + '%'