Programming/Databse
[ORACLE] 외래키 조회방법
비만오리
2018. 8. 20. 15:44
References : 외래키 조회
1. Query
SELECT uc.constraint_name, uc.table_name, ucc.column_name, uc.constraint_type, uc.r_constraint_name
FROM user_constraints uc, user_cons_columns ucc
WHERE uc.constraint_name = ucc.constraint_name;
2. Constraint_Type
- P : Primary Key
- R : Foreign Key
- U : Unique
- C : Not Null, Check
반응형