메뉴 건너뛰기

kode2.com

FK 포린키 조회

2019.02.16 15:57

kode2 조회 수:44

SELECT name FROM sysobjects so 
INNER JOIN sysreferences sr ON sr.constid=so.id
WHERE so.xtype='F'
AND parent_obj=(SELECT id FROM sysobjects WHERE name='ParentTable')
AND sr.rkeyid=(SELECT id FROM sysobjects WHERE name='ChildTable')