select
object_name(a.parent_object_id) as
'表名'
from
sys.foreign_keys a
where
a.referenced_object_id=object_id(
'XXX'
) --XXX为需要查询的表
select
object_name(a.parent_object_id) as
'表名'
from
sys.foreign_keys a
where
a.referenced_object_id=object_id(
'XXX'
) --XXX为需要查询的表