SQL - ALTER SEQUENCE

(Since v2.2)

Alters a sequence. All the settings can be changed, but the sequence type.

Syntax

ALTER SEQUENCE <sequence> [START <start>] [INCREMENT <increment>] [CACHE <cache>]

Where:

  • sequence is the sequence name to alter
  • start set the initial value of the sequence
  • increment set the value to increment when .next() is called
  • cache set the number of values to pre-cache in case the sequence is of type CACHED

See also

Examples

Alter a sequence by resetting the value to 1000

ALTER SEQUENCE idseq START 1000

To know more about other SQL commands look at SQL commands.