Modifies the properties for an existing sequence.
ALTER SEQUENCE [ IF EXISTS ] <name> RENAME TO <new_name> ALTER SEQUENCE [ IF EXISTS ] <name> [ SET ] [ INCREMENT [ BY ] [ = ] <sequence_interval> ] ALTER SEQUENCE [ IF EXISTS ] <name> SET COMMENT = '<string_literal>' ALTER SEQUENCE [ IF EXISTS ] <name> UNSET COMMENT
Specifies the identifier for the sequence to alter. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
RENAME TO new_name
Specifies the new identifier for the sequence; must be unique for the schema.
For more details, see CREATE SEQUENCE.
[ INCREMENT [ BY ] sequence_interval
Specifies the step interval of the sequence:
For positive sequence interval
n, the next
n-1values are reserved by each sequence call.
For negative sequence interval
-n, the next
n-1lower values are reserved by each sequence call.
Supported values are any value that can be represented by a 64-bit two’s compliment integer.
0is not allowed as a sequence interval.
COMMENT = 'string_literal'
Adds a comment or overwrites an existing comment for the sequence.
Specifies the properties to unset for the role, which resets them to the defaults.
Currently, the only property you can unset is
COMMENT, which removes the comment, if one exists, for the sequence.
The first/initial value for a sequence cannot be changed after the sequence is created.
ALTER SEQUENCE myseq RENAME TO newseq;