如何判断 sp_addextendedproc 过程是否存在 然后恢复
if exists(select 1 from sysobjects where id=object_id('dbo.sp_addextendedproc') and xtype='P') create procedure sp_addextendedproc @functname nvarchar(517),@dllname varchar(255) as set implicit_transactions off if @@trancount > 0 begin raiserror(15002,-1,-1,'sp_addextendedproc') return (1) end dbcc addextendedproc( @functname, @dllname) return (0)
else
print '不存在'
貌似create 语句不允许出现在第2句
不知道该怎么写