1

有没有办法找出表的依赖关系。我的意思是说哪个存储过程正在影响表的数据。

4

1 回答 1

0

试试这个命令:

SELECT DISTINCT so.name
 FROM syscomments sc
 INNER JOIN sysobjects so ON sc.id=so.id
 WHERE sc.TEXT LIKE '%tablename%'
 ----Option 2
 SELECT DISTINCT o.name, o.xtype
 FROM syscomments c
 INNER JOIN sysobjects o ON c.id=o.id
 WHERE c.TEXT LIKE '%tablename%'
于 2012-07-20T10:54:01.277 回答