statement

ALTER SEQUENCE

Changes sequence configuration; RESTART sets the value returned by the next nextval call. Example target: PostgreSQL 17. Use only the isolated starter dataset; setup and expected results are in the batch evidence.

Formal Syntax & Structure

sql syntaxsql
ALTER SEQUENCE name RESTART WITH number

Working Example

Example Snippetsql
CREATE SEQUENCE lab_seq;ALTER SEQUENCE lab_seq RESTART WITH 20;
SQL Reference
ALTER SEQUENCE — SQL Syntax & Examples | ByteMind