Valid in: SQL, ESQL
The Alter Sequence statement changes sequence settings that were specified when the sequence was created.
The Alter Sequence syntax has the following format:
[EXEC SQL] ALTER SEQUENCE [schema.]sequence_name [sequence_options]
See Create Sequence for details.
You must have "create_sequence" privileges. You must also have the "next" privilege to retrieve values from a defined sequence. For information on the "next" privilege, see Grant (privilege).
In applications, sequences use logical locks that allow multiple transactions to retrieve and update the sequence value while preventing changes to the underlying sequence definition. The logical lock is held until the end of the transaction.
The following examples change sequence settings that were specified when the sequence was created:
alter sequence XYZ restart with 10
alter sequence XYZ increment by 20