SQL Flow Field Guide

ALTER SEQUENCE

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

changes a sequence

What changes

Input
catalog
Output or change
sequence object (start, increment, cycle, cache)

Syntax at a glance

ALTER SEQUENCE [ schema_name. ] sequence_name [ RESTART [ WITH <constant> ] ] [ INCREMENT BY <constant> ] [ { MINVALUE <constant> } | { NO MINVALUE } ] [ { MAXVALUE <constant> } | { NO MAXVALUE } ] [ CYCLE | { NO CYCLE } ] [ { CACHE [ <constant> ] } | { NO CACHE } ] [ ; ]

Work example

A sequence needs a planned range, increment, cache, or restart change.

Compare current values with table keys and check whether a restart could reuse an issued value.

Check your work The next lab value stays in range and does not collide with stored keys.

Open Microsoft Learn for full syntax, permissions, and details for your version.