Firebird Documentation IndexFirebird 2.0 Language Ref. UpdateDDL statements → CREATE SEQUENCE
Firebird Home Firebird Home Prev: CREATE PROCEDUREFirebird Documentation IndexUp: DDL statementsNext: CREATE TABLE

CREATE SEQUENCE

Tip

Find a more recent version at Firebird 5.0 Language Reference: SEQUENCE (GENERATOR)

Available in: DSQL

Added in: 2.0

Description: Creates a new sequence or generator. SEQUENCE is the SQL-compliant term for what InterBase and Firebird have always called a generator. CREATE SEQUENCE is fully equivalent to CREATE GENERATOR and is the recommended syntax from Firebird 2.0 onward.

Syntax: 

CREATE SEQUENCE sequence-name

Example: 

create sequence seqtest

Because internally sequences and generators are the same thing, you can freely mix the generator and sequence syntaxes, even when operating on the same object. This is not recommended however.

Sequences (or generators) are always stored as 64-bit integer values, regardless of the database dialect. However:

See also: ALTER SEQUENCE, NEXT VALUE FOR, DROP SEQUENCE

Prev: CREATE PROCEDUREFirebird Documentation IndexUp: DDL statementsNext: CREATE TABLE
Firebird Documentation IndexFirebird 2.0 Language Ref. UpdateDDL statements → CREATE SEQUENCE