`
xiaoshan5634
  • 浏览: 71792 次
  • 性别: Icon_minigender_1
  • 来自: 东莞
社区版块
存档分类
最新评论

sql server查询数据库中所有包含某文本的存储过程、视图和函数的SQL

阅读更多

方法一:

select * 
from sysobjects o, syscomments s 
where o.id = s.id 
and text like '%yyao%' 
and o.xtype = 'P' 

将yyao替换成自己要查找的文本 

 

方法二:

select routine_name,routine_definition,routine_type
from information_schema.routines
where routine_definition like '%Parent%'
order by routine_type

 将Parent替换成自己要查找的文本 

 

方法三:

sp_depends customer

 此方法只能查找数据库对象,如表、视图、存储过程、函数

1
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics