There are multiple Stored Procedures in a DB. I want to modify a Column in the stored procedures. Some stored procedures do have that column in them and some have not. I want to modify column length from 500 to MAX in all those stored procedures which have that column present. I want a script that changes the column length from 500 to MAX in all those stored procedures that has that column present in it. Assuming all stored procedures are under a same Database.For example i want to make @MSG NVARCHAR (MAX)=NULL in place of @MSG NVARCHAR (500)=NULL. I have to make this all the stored procedures all at once which have @MSG present in them.
Eg. USE Database1
GO
SET ANSI NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[storedprocedurename]
(
@DATE DATETIME=NULL,
@ORDER NVARCHAR (50)=NULL,
@MSG NVARCHAR (500)=NULL)
AS BEGIN GO