Change any keyword(variable) into all Stored Procedures in Two Steps

Change any keyword(variable) into all stored procedures in two steps.

 

select replace(replace(definition,'create','alter'),'x','y') from sys.sql_modules where definition like'% procedure %' or definition like'% proc %'

 
It will show a list of definition of all stored procedures.

Just Copy all rows by select all option and paste on query editor and click on run, it will alter all your procedures in one shot.

Ebook Download
View all
Learn
View all