--1.查询某个表被哪些存储过程使用到 : select distinct object_name(id) from syscomments where id in ( select object_id from sys.objects ...
select distinct object name id from syscomments where id in select id from sysobjects where type in V , P and text like tablename 其中sysobjects 中的type V View P Proc ...
2014-05-05 21:47 0 3991 推荐指数:
--1.查询某个表被哪些存储过程使用到 : select distinct object_name(id) from syscomments where id in ( select object_id from sys.objects ...
--sql2008 查询某个表被那些存储过程用到select distinct object_name(id) from syscommentswhere id in (select object_id from sys.objects where type ='P')and UPPER ...
--查询某个表被哪些视图/存储过程使用(type='P':表示存储过程,type='V':表示视图)SELECT OBJECT_NAME(id) FROM syscomments WHERE id IN(SELECT object_id FROM sys.objects WHERE type='P ...
1. 查看用户表 其中type或xtype值:U = 用户表 S = 系统表 V = 视图 FN = 标量函数 TF = 表函数 P = 存储过程 TR = 触发器 D = 默认值或 DEFAULT 约束 PK = PRIMARY KEY ...
1.查询某个表被哪些存储过程(以下简称 SP)使用 : select distinct object_name(id) fromsyscomments where id in (select object_id from sys.objects where type='P ...
1.查询某个表被哪些存储过程(以下简称 SP)使用 : select distinct object_name(id) fromsyscomments where id in (select object_id from sys.objects where type='P ...
1.查询某个表被哪些存储过程(以下简称 SP)使用到 : select distinct object_name(id) from syscomments where id in (select object_id from sys.objects where type ='P ...
1.查询某个表被哪些存储过程(以下简称 SP)使用到 : select distinct object_name(id) from syscomments where id in (select object_id from sys.objects where type ='P ...