A sequence (also called number generator) is a database object whose value the database system automatically increases or decreases with each access. To guarantee quick access, the database system holds the values and management information for sequences in the sequence cache.
Property |
Description (Link to SQL Reference Manual) |
---|---|
Sequence Name |
|
Schema |
|
Start With |
First value of the sequence |
Increment By |
Difference between two successive values of the sequence A negative value generates a descending sequence. Default value: 1 |
Minimum Value |
Minimum value |
Maximum Value |
Maximum value |
Values to Cache |
Number of values of the sequence that the system stores in the sequence cache |
Cycle |
Ascending sequences: after the system has reached the maximum value, it allocates the minimum value as next value. Descending sequences: after the system has reached the minimum value, it allocates the maximum value as next value. |
Database Studio, Creating Sequences, Deleting Sequences
SQL Tutorial, Number Generators for Tables
SQL Reference Manual, CREATE SEQUENCE Statement