SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)
SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual—691117-005
2-100
CREATE SEQUENCE Statement
Syntax Description of CREATE SEQUENCE
sequence
specifies the ANSI name of the sequence generator.
sequence-generator-data-type-option
specifies the sequence generator data type. Specifying the data type is optional.
The supported data types are:
°
Signed or Unsigned SMALLINT
°
Signed or Unsigned INTEGER
°
Signed LARGEINT, which is the default data type
°
Signed or Unsigned NUMERIC with maximum precision of 28
sequence-generator-start-with-option
specifies the first sequence number.
By default, the minimum value of the sequence generator data type is considered
as the start value for an ascending sequence and the maximum value is
considered as the start value for a descending sequence.
The start value must be less than or equal to MAXVALUE, and greater than or
equal to MINVALUE.
sequence-generator-increment-by-option
specifies the increment value to be added to the CURRENT_VALUE to obtain the
next value in the sequence. Default is 1 (one). This value cannot be 0 (zero).
Sequences can be either ascending or descending. An ascending sequence is
associated with a positive increment and a descending sequence is associated
with a negative increment.
sequence-generator-cycle-option is:
{ CYCLE | NOCYCLE | NO CYCLE}
sequence-generator-cache-option is:
{ CACHE sequence-generator-numeric-value | NOCACHE }
sequence-generator-order-option is: { ORDER | NOORDER }
sequence-generator-numeric-value is: < numeric-literal >
sequence-file-option is:
LOCATION [\node.]$volume[.subvolume.file-name]










