of MAXVALUE and MINVALUE. If this value is negative, then the sequence descends. If
the value is positive, then the sequence ascends. If you omit this clause, then the interval
defaults to 1.
START WITH: Specify the first sequence number to be generated. Use this clause to
start an ascending sequence at a value greater than its minimum or to start a
descending sequence at a value less than its maximum. For ascending sequences, the
default value is the minimum value of the sequence. For descending sequences, the
default value is the maximum value of the sequence. This integer value can have 28 or
fewer digits.
Note:
This value is not necessarily the value to which an ascending cycling sequence cycles
after reaching its maximum or minimum value.
MAXVALUE Specify the maximum value the sequence can generate. This integer value
can have 28 or fewer digits. MAXVALUE must be equal to or greater
thanSTART WITH and must be greater than MINVALUE.
NOMAXVALUE: Specify NOMAXVALUE to indicate a maximum value of 10
27
for an
ascending sequence or -1 for a descending sequence. This is the default.
MINVALUE Specify the minimum value of the sequence. This integer value can have 28
or fewer digits. MINVALUE must be less than or equal to START WITH and must be less
than MAXVALUE.
NOMINVALUE: Specify NOMINVALUE to indicate a minimum value of 1 for an
ascending sequence or -10
26
for a descending sequence. This is the default.
CYCLE: Specify CYCLE to indicate that the sequence continues to generate values after
reaching either its maximum or minimum value. After an ascending sequence reaches
its maximum value, it generates its minimum value. After a descending sequence
reaches its minimum, it generates its maximum value.
NOCYCLE: Specify NOCYCLE to indicate that the sequence cannot generate more values
after reaching its maximum or minimum value. This is the default.
CACHE Specify how many values of the sequence the database preallocates and keeps in
memory for faster access. This integer value can have 28 or fewer digits. The minimum
value for this parameter is 2. For sequences that cycle, this value must be less than the
number of values in the cycle. You cannot cache more values than will fit in a given cycle
of sequence numbers. Therefore, the maximum value allowed for CACHE must be less
than the value determined by the following formula:
(CEIL (MAXVALUE - MINVALUE)) / ABS (INCREMENT)