且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

查询表的外键关系

更新时间:2023-01-20 12:00:42

这应该可以工作(或者关闭):

This should work (or something close):

select table_name
from all_constraints
where constraint_type='R'
and r_constraint_name in 
  (select constraint_name
  from all_constraints
  where constraint_type in ('P','U')
  and table_name='<your table here>');