scalar-extension

nextval

Advance a sequence atomically and return its new value. Allocated values are not reclaimed on rollback.

Formal Syntax & Structure

sql syntaxsql
nextval(sequence regclass)

Working Example

Example Snippetsql
CREATE TEMP SEQUENCE bm_seq START 10; SELECT nextval('bm_seq');
SQL Reference