Oracle user_constraints表constraint_type列中的字母代码代表什么?

时间:2008-10-08 16:26:35

标签: oracle constraints oracleinternals

select distinct constraint_type from user_constraints;

C
-
C
P
R
U

似乎P表示主键,R表示外键,对吗?什么是U和C?

2 个答案:

答案 0 :(得分:69)

来自12cR1 documentation

C - Check constraint on a table  
P - Primary key  
U - Unique key  
R - Referential integrity  
V - With check option, on a view  
O - With read only, on a view  
H - Hash expression  
F - Constraint that involves a REF column  
S - Supplemental logging

答案 1 :(得分:62)

Code Description                Acts On Level
---------------------------------------------
C    Check on a table           Column
O    Read Only on a view        Object
P    Primary Key                Object
R    Referential (Foreign Key)  Column
U    Unique Key                 Column
V    Check Option on a view     Object