Subject Re: [firebird-support] How to return a IDENTITY field before insert it?
Author Elton Fadel
Thanks  (:


Em Quarta-feira, 14 de Fevereiro de 2018 17:20, "Mark Rotteveel mark@... [firebird-support]" <firebird-support@yahoogroups.com> escreveu:


 
On 2018-02-14 18:59, Omacht AndrĂ¡s aomacht@... [firebird-support]
wrote:
> Hi!
>
> Select gen_id(generator_name, 1)) as new_id from rdb$database

You should not do this with the generator of an identity column. The
system sequence to back the identity column is an implementation detail,
and if you have a need to access it like this on a regular basis, then
you probably shouldn't be using an identity column at all.

Mark