Oracle SQL - Constraint Definitions in the Data Dictionary


Constraint definitions are stored in the data dictionary.

The two most important views are USER_CONSTRAINTS and USER_CONS_COLUMNS.

The following code shows how you can produce an overview of all referential integrity constraints for the current user.

SQL> select table_name
  2  ,      constraint_name
  3  ,      status
  4  ,      r_constraint_name as references
  5  from   user_constraints
  6  where  constraint_type = 'R';


Related Topic