|Oracle® Database SQL Reference
10g Release 1 (10.1)
Part Number B10759-01
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.
See Also:CREATE SEQUENCE for additional information on sequences
The sequence must be in your own schema, or you must have the
ALTER object privilege on the sequence, or you must have the
SEQUENCE system privilege.
If you change the
BY value before the first invocation of
NEXTVAL, some sequence numbers will be skipped. Therefore, if you want to retain the original
WITH value, you must drop the sequence and re-create it with the original
WITH value and the new
Oracle Database performs some validations. For example, a new
MAXVALUE cannot be imposed that is less than the current sequence number.
This statement sets a new maximum value for the
customers_seq sequence, which was created in "Creating a Sequence: Example":
ALTER SEQUENCE customers_seq MAXVALUE 1500;
This statement turns on
CACHE for the
ALTER SEQUENCE customers_seq CYCLE CACHE 5;