Who Can Alter a Sequence?
The ALTER SEQUENCE
(ALTER GENERATOR
) statement can be executed by:
-
The owner of the sequence
-
Users with the
ALTER ANY SEQUENCE
(ALTER ANY GENERATOR
) privilege
The ALTER SEQUENCE
(ALTER GENERATOR
) statement can be executed by:
The owner of the sequence
Users with the ALTER ANY SEQUENCE
(ALTER ANY GENERATOR
) privilege
ALTER SEQUENCE
Setting the value of the EMP_NO_GEN
sequence so the next value is 145.
ALTER SEQUENCE EMP_NO_GEN RESTART WITH 145;
Resetting the base value of the sequence EMP_NO_GEN
to the initial value stored in the metadata
ALTER SEQUENCE EMP_NO_GEN RESTART;
Changing the increment of sequence EMP_NO_GEN
to 10
ALTER SEQUENCE EMP_NO_GEN INCREMENT BY 10;