3.179 ALL_DOMAIN_CONSTRAINTS

ALL_DOMAIN_CONSTRAINTS describes constraint definitions in the application usage domains accessible to the current user.

Related Views

  • DBA_DOMAIN_CONSTRAINTS describes constraint definitions in all application usage domains in the database.

  • USER_DOMAIN_CONSTRAINTS describes constraint definitions in the application usage domains owned by the current user.

Column Datatype NULL Description

NAME

VARCHAR2(128)

NOT NULL

Name of the constraint definition

DOMAIN_OWNER

VARCHAR2(128)

NOT NULL

Owner of the domain in which the constraint is defined

DOMAIN_NAME

VARCHAR2(128)

NOT NULL

Name of the domain in which the constraint is defined

CONSTRAINT_TYPE

VARCHAR2(1)

Type of the constraint definition

The value of this column is always C, which means the constraint is either a check constraint or a NOT NULL constraint.

SEARCH_CONDITION

CLOB

Text of the search condition for a check constraint

STATUS

VARCHAR2(8)

Enforcement status of the constraint:

  • ENABLED

  • DISABLED

DEFERRABLE

VARCHAR2(14)

Indicates whether the constraint is deferrable (DEFERRABLE) or not (NOT DEFERRABLE)

DEFERRED

VARCHAR2(9)

Indicates whether the constraint was initially deferred (DEFERRED) or not (IMMEDIATE)

VALIDATED

VARCHAR2(13)

When STATUS = ENABLED, possible values are:

  • VALIDATED - All data obeys the constraint (that is, the existing data in the table was validated when the constraint was enabled, as well as any subsequent data entered into the table)

  • NOT VALIDATED - All data may not obey the constraint (that is, the existing data in the table was not validated when the constraint was enabled, but subsequent data entered into the table was validated)

When STATUS = DISABLED, possible values are:

  • VALIDATED - All data obeys the constraint, but the unique index on the constraint has been dropped. This setting is useful in data warehousing environments, but has some restrictions. Refer to Oracle Database Data Warehousing Guide for more information on this setting.

  • NOT VALIDATED - All data may not obey the constraint

GENERATED

VARCHAR2(14)

Indicates whether the name of the constraint is user-generated (USER NAME) or system-generated (GENERATED NAME)

BAD

VARCHAR2(3)

Indicates whether the constraint specifies a century in an ambiguous manner (BAD) or not (null). To avoid errors resulting from this ambiguity, rewrite the constraint using the TO_DATE function with a four-digit year.

See Also: the TO_DATE function in Oracle Database SQL Language Reference and Oracle Database Development Guide

RELY

VARCHAR2(4)

When VALIDATED = NOT VALIDATED, this column indicates whether the constraint is to be taken into account for query rewrite (RELY) or not (null).

When VALIDATED = VALIDATED, this column is not meaningful.

See Also: constraints in Oracle Database SQL Language Reference

INVALID

VARCHAR2(7)

Indicates whether the constraint is invalid (INVALID) or not (null)

ORIGIN_CON_ID

NUMBER

The ID of the container where the data originates. Possible values include:

  • 0: This value is used for rows in non-CDBs. This value is not used for CDBs.

  • n: This value is used for rows containing data that originate in the container with container ID n (n = 1 if the row originates in root).

Note:

This view is available starting with Oracle Database 23c.