1. 程式人生 > >自定義儲存過程檢視儲存過程的定義

自定義儲存過程檢視儲存過程的定義

createprocedure cxy_helptext
@objnamenvarchar(776),
@sptextnvarchar(1000) output
asset nocount ondeclare@SyscomTextnvarchar(4000) , 
@objidnvarchar(128)

select@objid=object_id(@objname)
select@sptext=[text]from syscomments where id=@objidreturn-- sp_helptext GOdeclare@textnvarchar(1000)
EXECUTE cxy_helptext cxy_helptext, 
@text OUTPUT
print@text