功能:快速查找存储过程和触发器
参数:@name,存储过程名或者触发器名
      @type,类型,'sp'为存储过程,'Tr'为触发器
create function Query_Object(@name varchar(100), @type varchar(2))
RETURNS TABLE
as
return(select b.name ,a.text from syscomments a,sysobjects b
 where object_id(b.name)=a.id and b.xtype=@type and b.name=@name)
--测试
select * from Query_Object('sql_Object','sp')
--利用系统存储过程查看:
sp_helptext  sql_Object

相关文章:

  • 2021-12-05
  • 2022-02-10
  • 2022-02-03
  • 2021-09-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-07
  • 2021-10-16
相关资源
相似解决方案