Database Reference
In-Depth Information
Figure 22.3
Create a Sequence
That Counts
Backward.
MAXVALUE
. Sets a maximum value for a sequence. The default is
NOMAXVALUE. Be aware that a column datatype may cause an
error if the number grows too large. For example, if the sequence is
used to populate a column of NUMBER(5) datatype, once the
sequence reaches 99999, then the next increment will cause an error.
CYCLE
. Causes a sequence to cycle around to its minimum when
reaching its maximum for an ascending sequence, and to cycle
around to its maximum when reaching its minimum for a descending
sequence. The default is NOCYCLE. If you reach the maximum
value on a sequence having NOCYCLE, you will get an error on the
next query that tries to increment the sequence.
CACHE
. This option caches precalculated sequences into a buffer. If
the database crashes, then those sequence values will be lost. Unless it
Search WWH ::




Custom Search