日期:2014-05-18 浏览次数:20588 次
exec sp_depends '已知表名'
------解决方案--------------------
如果查外健关系:
create table t1(ID int primary key )
create table t2(ID int constraint FK_t2 foreign key references t1(ID))
select
object_name(fkeyID),object_name(rkeyID)
from
sysforeignkeys
where
fkeyID=object_id( 't2 ')