CREATE PROCEDURE test @uname varchar(10) AS BEGIN END
declare @text nvarchar(4000) select @text=replace(text,'@uname varchar(10)', '@uname varchar(20)') from syscomments where id=object_id('test') drop proc test exec (@text)