SQL/MX 2.x Reference Manual (H06.10+, J06.03+)

SQL/MX Clauses
HP NonStop SQL/MX Reference Manual544517-008
7-3
Considerations for DEFAULT
DEFAULT CURRENT_DATE
specifies the default value for the column as the value returned by the
CURRENT_DATE function at the time of the operation that assigns a value to the
column. This default can occur only with a column whose data type is DATE.
DEFAULT CURRENT_TIME
specifies the default value for the column as the value returned by the
CURRENT_TIME function at the time of the operation that assigns a value to the
column. This default can occur only with a column whose data type is TIME.
DEFAULT CURRENT_TIMESTAMP
specifies the default value for the column as the value returned by the
CURRENT_TIMESTAMP function at the time of the operation that assigns a value
to the column. This default can occur only with a column whose data type is
TIMESTAMP.
DEFAULT {CURRENT_USER | USER}
specifies the default value for the column as the value returned by the
CURRENT_USER or USER function at the time of the operation that assigns a
value to the column. This default can occur only with a column whose data type is
fixed or variable length CHARACTER.
NO DEFAULT
specifies the column has no default value. You cannot specify NO DEFAULT in an
ALTER TABLE statement. See ALTER TABLE Statement on page 2-10.
Considerations for DEFAULT
Default Value on a CREATE TABLE Statement
When the DEFAULT clause for a column is not specified, the column definition and the
NOT_NULL_CONSTRAINT_DROPPABLE_OPTION in the SYSTEM_DEFAULTS table
affects the default value in these ways:
Column Definition Default Value
column data-type Default null.
column data-type
NOT NULL DROPPABLE
Default null.