Change attribute for a sequence.
Usage
Embedded, Interactive, Module, ODBC, JDBC.
Description
Defines the next value for a sequence. That is, the next call to the function NEXT VALUE using this sequence will return the given restart value. The restart value must be within the limits of the minimum (MINVALUE) and maximum (MAXVALUE) values for the sequence.
Restrictions
Only the creator of a sequence may alter it.
Notes
The alter operation is only allowed if there is no user accessing the sequence.
Example
Restart a sequence with value 1.
ALTER SEQUENCE id_seq RESTART WITH 1;
Standard Compliance
Standard |
Compliance |
Comments |
---|---|---|
SQL-2016 |
Feature outside core |
Feature T176, “Sequence generator support”. |