SQL$HELP_OLD72.HLB  —  ALTER  DOMAIN  Arguments  domain-constraint
    Adds or modifies a constraint for the existing named domain.

    Domain constraints specify that columns based on the domain
    contain only certain data values or that data values can or
    cannot be null.

    Use the CHECK clause to specify that a value must be within a
    specified range or that it matches a list of values. When you
    specify a CHECK clause for a domain constraint, you ensure that
    all values stored in columns based on the domain are checked
    consistently.

    To refer to the values of all columns of a domain constraint, use
    the VALUE keyword. For example:

    SQL> CREATE DOMAIN dom1 CHAR(1)
    cont> CHECK (VALUE IN ('F','M'))
    cont> NOT DEFERRABLE;

    For any dialect other than SQL99, SQL92, ORACLE LEVEL 1 or
    ORACLE LEVEL 2, you must specify that domain constraints are
    NOT DEFERRABLE.

    When you add (or modify) a domain constraint, SQL propagates
    the new constraint definition to all the columns that are based
    on the domain. If columns that are based on the domain contain
    data that does not conform to the constraint, SQL returns the
    following error:

    %RDB-E-NOT_VALID, validation on field DATE_COL caused operation to fail
Close Help