SET GENERATOR

<< ALTER SEQUENCE | FB 2.5 Language Reference | DROP SEQUENCE >>
<< ALTER SEQUENCE | FB 2.1 Language Reference | DROP SEQUENCE >>
<< REVOKE ADMIN OPTION | FB 2.0 Language Reference | DML statements >>

SET GENERATOR

Available in: DSQL, ESQL

Better alternative: 2.0 – use ALTER SEQUENCE

Description

(Re)initializes a generator or sequence to the given value. From Firebird 2 onward, the SQL-compliant ALTER SEQUENCE syntax is preferred.

Syntax

 SET GENERATOR generator-name TO <new-value>

 <new-value> ::= A 64-bit integer.

Warning: Once a generator or sequence is up and running, you should not tamper with its value (other than retrieving next values with GEN_ID or NEXT VALUE FOR) unless you know exactly what you are doing.

See also:
SET GENERATOR
CREATE GENERATOR
CREATE PROCEDURE
CREATE TRIGGER
CREATE SEQUENCE
ALTER SEQUENCE
GEN_ID()
SET

back to top of page
<< ALTER SEQUENCE | FB 2.5 Language Reference | DROP SEQUENCE >>
<< ALTER SEQUENCE | FB 2.1 Language Reference | DROP SEQUENCE >>
<< REVOKE ADMIN OPTION | FB 2.0 Language Reference | DML statements >>