Show TOC

SequenceLocate this document in the navigation structure

Use

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.

Table 1: Sequence: Properties

Property

Description (Link to SQL Reference Manual)

Sequence Name

Sequence name (sequence_name)

Schema

Schema name (schema_name)

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.

More Information