FirebirdSQL logo

SET GENERATOR

Sets the current value of a sequence (generator)

Available in

DSQL, ESQL

Syntax
SET GENERATOR seq_name TO new_val
Table 1. SET GENERATOR Statement Parameters
Parameter Description

seq_name

Generator (sequence) name

new_val

New sequence (generator) value.A 64-bit integer from -2-63 to 263-1.

The SET GENERATOR statement sets the current value of a sequence or generator to the specified value.

Note

Although SET GENERATOR is considered outdated, it is retained for backward compatibility.Use of the standards-compliant ALTER SEQUENCE is recommended.

Who Can Use a SET GENERATOR?

The SET GENERATOR statement can be executed by:

  • Administrators

  • The owner of the sequence (generator)

  • Users with the ALTER ANY SEQUENCE (ALTER ANY GENERATOR) privilege