Oracle9i SQL Reference Release 1 (9.0.1) Part Number A90125-01 |
|
SQL Statements:
ALTER CLUSTER to ALTER SEQUENCE, 18 of 18
Use the ALTER
SEQUENCE
statement to change the increment, minimum and maximum values, cached numbers, and behavior of an existing sequence. This statement affects only future sequence numbers.
The sequence must be in your own schema, or you must have the ALTER
object privilege on the sequence, or you must have the ALTER
ANY
SEQUENCE
system privilege.
alter_sequence::=
alter_sequence
The keywords and parameters in this statement serve the same purposes they serve when you create a sequence.
INCREMENT
BY
value before the first invocation of NEXTVAL
, some sequence numbers will be skipped. Therefore, if you want to retain the original START
WITH
value, you must drop the sequence and re-create it with the original START
WITH
value and the new INCREMENT
BY
value.
MAXVALUE
cannot be imposed that is less than the current sequence number.
This statement sets a new maximum value for the eseq
sequence:
ALTER SEQUENCE employees_seq MAXVALUE 1500;
This statement turns on CYCLE
and CACHE
for the employees_seq
sequence:
ALTER SEQUENCE employees_seq CYCLE CACHE 5;
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|