SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
D-7
Data Types
TIME
is equivalent to DATETIME HOUR TO SECOND.
TIMESTAMP
is equivalent to DATETIME YEAR TO FRACTION(6).
INTERVAL start-field [ (sf-prec) ] [ TO end-field ]
specifies a column that represents a duration of time as a year-month or day-time
interval. start-field and end-field specify the starting or ending field in one
of these ranges of interval fields:
YEAR, MONTH
DAY, HOUR, MINUTE, SECOND, FRACTION(fraction-prec)
If the ending field is FRACTION, you can specify a precision of from 1 to 18 digits,
within parentheses; the default is FRACTION(6).
sf-prec is an unsigned integer greater than 0 that specifies the number of
significant digits allowed for the first field of INTERVAL values.
DEFAULT default-type | NO DEFAULT
specifies a default value for the column or specifies that the column has no default
value. default-type must be a literal compatible with the data type of the
column or one of the keywords CURRENT, SYSTEM, or NULL. For information,
see DEFAULT Clause on page D-26.
The default is DEFAULT NULL.
NOT NULL
specifies that the column cannot contain any null values. For information, see Null
Values on page N-7.
You cannot specify NOT NULL if you also specify DEFAULT NULL, either explicitly
or by default.