statement

CREATE SEQUENCE

Creates a number generator. PostgreSQL sequence increments are not rolled back with ordinary transaction changes, so gaps are possible. Example target: PostgreSQL 17. Use only the isolated starter dataset; setup and expected results are in the batch evidence.

Formal Syntax & Structure

sql syntaxsql
CREATE SEQUENCE name START WITH number

Working Example

Example Snippetsql
CREATE SEQUENCE lab_seq START WITH 10;
SQL Reference