有没有办法让所有具有外键的表到oracle中的另一个表中查询?
这是
a good article的答案:
select owner,constraint_name,constraint_type,table_name,r_owner,r_constraint_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='TABLE_NAME');