Search code examples
oracle-databaseconstraintsoracleinternals

What do the letter codes in Oracle user_contraints table's constraint_type column stand for?


select distinct constraint_type from user_constraints;

C
-
C
P
R
U

Seems P means primary key and R means foreign key, correct? What are U and C?


Solution

  • 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