当前位置:数据库 > Oracle >>

Oracle查看表之间的键关联关系

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
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,