Subject Re: Set generator values in Stored Procedure
Author Svein Erling Tysvær
> > Is there any way of setting generator values (to 0) in a stored
> > procedure?
> If you're using Firebird 1.5, use the EXECUTE STATEMENT statement.

Or do

GEN_ID(My_Generator, -GEN_ID(My_Generator, 0))

which should work in any version (or if GEN_ID doesn't accept
parametres, then get the value into a variable first). In case of
others interfering between the two calls (well, in most cases you
shouldn't decrement nor set a generator while people are using it),
the generator will not be reset to 0, but to a low positive number.