Example of RECREATE SEQUENCE
EMP_NO_GEN
RECREATE SEQUENCE EMP_NO_GEN
START WITH 10
INCREMENT BY 2;
RECREATE SEQUENCE
EMP_NO_GEN
RECREATE SEQUENCE EMP_NO_GEN
START WITH 10
INCREMENT BY 2;
SET GENERATOR
Sets the current value of a sequence (generator)
DSQL, ESQL
SET GENERATOR seq_name TO new_val
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
?The SET GENERATOR
statement can be executed by:
The owner of the sequence (generator)
Users with the ALTER ANY SEQUENCE
(ALTER ANY GENERATOR
) privilege
SET GENERATOR
EMP_NO_GEN
sequence to 145:SET GENERATOR EMP_NO_GEN TO 145;
Note
|
Similar effects can be achieved with [fblangref50-ddl-sequence-alter]: ALTER SEQUENCE EMP_NO_GEN RESTART WITH 145 + increment; Here, the value of increment is the current increment of the sequence.We need add it as |