首页 > 数据库技术 > 详细

SQL server 查询某个表在哪些存储过程(SP)中使用到

时间:2014-11-24 16:46:02      阅读:224      评论:0      收藏:0      [点我收藏+]
1.查询某个表被哪些存储过程(以下简称 SP)使用到 :

select distinct object_name(id) from syscomments where id in

(select id from sysobjects where type =‘P‘) and text like‘%TableName%‘

 

2.查找那些过程对该表做了更新操作:

select distinct object_name(id) from syscomments where id in

(select id from sysobjects where type =‘P‘) and text like‘%update tablename%‘

SQL server 查询某个表在哪些存储过程(SP)中使用到

原文:http://www.cnblogs.com/yzl495/p/4118750.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!