5.4. USER_CONS_COLUMNS

The USER_CONS_COLUMNS tells you what columns make up the constraint. Details about the constraint, such as whether it is a CHECK or UNIQUE constraint, are in USER_CONSTRAINTS. The SQL*Plus describe of the table is the following.

SQL> DESC user_cons_columns

Name                          Null?    Type
----------------------------- -------- -----------------
OWNER                         NOT NULL VARCHAR2(30)
CONSTRAINT_NAME               NOT NULL VARCHAR2(30)
TABLE_NAME                    NOT NULL VARCHAR2(30)
COLUMN_NAME                            VARCHAR2(4000)
POSITION                               NUMBER
OWNERThis is the owner of the table in which the constraint is enforced.
CONSTRAINT_NAMEThis is the name used in the DDL. You use this name to ALTER or DROP the constraint. If there is no constraint name specified in the DDL, Oracle creates the constraint ...

Get Programming Oracle® Triggers and Stored Procedures, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.