Oracle查看表之间的键关联关系
类别:Oracle数据库 作者:码皇 来源:互联网 点击:
Oracle查看表之间的键关联关系select a constraint_name, a table_name, b constraint_namefrom user_constraints a, user_constraints bwhere a constraint_type = & 39;R& 39;and b constraint_typ
Oracle查看表之间的键关联关系
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
P 代表主键
R 代表外键
相关热词搜索:
Oracle 查看 之间