当我们阅读别人的存储过程的时候,想在多个存储过程搜索一个特定的值,下面这个存储过程可以帮助你在多个存储过程中找寻特定值
CREATE PROCEDURE Find_Text_In_SP @StringToSearch varchar(100) AS SET @StringToSearch = '%' +@StringToSearch + '%' SELECT Distinct SO.Name FROM sysobjects SO (NOLOCK) INNER JOIN syscomments SC (NOLOCK) on SO.Id = SC.ID AND SO.Type = 'P' AND SC.Text LIKE @stringtosearch ORDER BY SO.Name GO