ALTER SEQUENCE statement
The ALTER SEQUENCE statement defines changes to a sequence definition.
ALTER SEQUENCE schema 1. sequenceName 1 | This option specifies the sequence to be changed. | ||||||
---|---|---|---|---|---|---|---|
SCHEMA schema 2 | This option specifies the new schema for the sequence. | ||||||
NAME sequenceName 2 | This option specifies the new name of the sequence. | ||||||
TYPESCHEMA dataTypeSchema | This option specifies the schema for the sequence data type. | ||||||
TYPENAME dataTypeName | This option specifies the name of the sequence data type. | ||||||
LENGTH numeric | For sequences that are defined as a DECIMAL data type, this option specifies the length of the value. | ||||||
START numeric | This option specifies the starting value for the sequence. The default value is the minimum value for an ascending sequence or the maximum value for a descending sequence. | ||||||
INCREMENT numeric | This option specifies the amount of change in the values for the sequence. The value can be any positive or negative integer, including 0 (zero). The default value is 1. | ||||||
MINVALUE | This option specifies the minimum value for a sequence. The minimum value can be equal to or less than the maximum value. MINVALUE parameter values
| ||||||
MAXVALUE | This option specifies the maximum value for a sequence. The maximum value can be equal to or greater than the minimum value. MAXVALUE parameter values
| ||||||
CYCLE | This option indicates whether values should be generated after the maximum or minimum value is reached. CYCLE parameter values
| ||||||
CACHE integer | This option specifies the number of a set of values that are stored for the sequence. A value of 0 (zero) is the equivalent of NO CACHE. | ||||||
ORDER | This option indicates whether values must be generated in the order in which they are requested. The following table lists valid values for the ORDER parameter. ORDER parameter values
| ||||||
COMMENT 'string' | This option specifies the comment for the sequence. |
Related topic