SQL/MX 3.1 Reference Manual (H06.23+, J06.12+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.1 Reference Manual663850-001
2-32
Considerations for ALTER TABLE
°
This incremented value is saved in the CURRENT_VALUE of the internal
sequence generator table. This insures the internal sequence generator value
will then generate unique numbers for the IDENTITY column.
Recalibrate to a user-specified value with SELECT
This method always performs a SELECT on the base table containing the IDENTITY
column to obtain the current maximum value of the IDENTITY column. This maximum
value will be compared to the user-specified value. The user-specified value will not be
incremented using the INCREMENT BY internal sequence generator option or
adjusted to match its numbering scheme.
Rules for recalibrating to a user-specified value
The column to be recalibrated must exist and be an IDENTITY column in the table.
The user-specified recalibration value must be included, be a positive number, and
must not be greater than the maximum value allowed for the data type of the
IDENTITY column. In addition, the user-specified recalibration value must not be
greater than MAXVALUE option of the internal sequence generator.
The current maximum value obtained by performing the SELECT is used in the
following rules:
°
If the default specification type is GENERATED ALWAYS AS IDENTITY, the
user-specified recalibration value must be larger than the current maximum
value of the IDENTITY column in the base table.
°
If the default specification type is GENERATED BY DEFAULT AS IDENTITY, a
number less than the current maximum value of the IDENTITY column is
allowed.
The user-specified recalibration value must not be less than the START WITH and
MINVALUE options of the internal sequence generator.
The user-specified recalibration value will not be synchronized with the
INCREMENT BY numbering scheme. The user-specified value will be considered
a pure override.
Recalibrate to a user-specified value without SELECT
This method does not perform a SELECT on the base table containing the IDENTITY
column to obtain the current maximum value of the IDENTITY column. The user-
specified value will not be incremented using the INCREMENT BY internal sequence
generator option or adjusted to match its numbering scheme.
Rules for recalibrating to a user-specified value without SELECT
The column to be recalibrated must exist and be an IDENTITY column in the table.
The user-specified recalibration value must be included, be a positive number, and
must not be greater than the maximum value allowed for the data type of the
IDENTITY column.