1、通过下面SQL语句查询外键对应的表及字段 P代表主键 R代表外键
select a.constraint_name, a.table_name, b.constraint_name
from user_constraints a, user_constraints b
where a.constraint_type = 'R'
and b.constraint_type = 'P'
and a.r_constraint_name = b.constraint_name
显示外键表及外键约束名称
select a.*
from user_constraints a, user_constraints b
where a.constraint_type = 'R'
and b.constraint_type = 'P'
and b.table_name='主表名称'
and a.r_constraint_name = b.constraint_name