Get a list of all SPs with some condition

I want to have a list of all SPs from my database that fulfill some conditions, say, all those SPs that have StudentId, because I want to update these SPs where StudentId will be the key column.

How can I get a list of all such SPs?

Thanks for your details.

+3
source share
1 answer
select OBJECT_NAME(object_id) 
from sys.sql_modules
where  OBJECTPROPERTY(object_id,'IsProcedure') = 1 and 
    definition like '%StudentId%' 
+3
source

Source: https://habr.com/ru/post/1766775/


All Articles