When trying to identify what foreign keys existing in a DB2 database the sysibm.sysrels table is the best place to look. The query below will give you all the information you need.
select *
from sysibm.sysrels
where tbname = 'CHILD TABLE'
and reftbname = 'PARENT TABLE'
No comments:
Post a Comment