Re: [firebird-support] How to return a IDENTITY field before insert it?

2018-02-14 Thread Elton Fadel galdari...@yahoo.com.br [firebird-support]
Thanks  (: Em Quarta-feira, 14 de Fevereiro de 2018 17:20, "Mark Rotteveel m...@lawinegevaar.nl [firebird-support]" escreveu:   On 2018-02-14 18:59, Omacht András aoma...@mve.hu [firebird-support] wrote: > Hi! > > Select gen_id(generator_name, 1)) as new_id from rdb$database You

Re: [firebird-support] How to return a IDENTITY field before insert it?

2018-02-14 Thread Omacht András aoma...@mve.hu [firebird-support]
Hi! Select gen_id(generator_name, 1)) as new_id from rdb$database Andras -- Omacht András Eredeti üzenet Feladó: "Elton Fadel galdari...@yahoo.com.br [firebird-support]" Dátum: 2018. 02. 14. 18:56 (GMT+01:00) Címzett: firebird-support@yahoogroups.com Tárgy: [firebird-suppor

Re: [firebird-support] How to return a IDENTITY field before insert it?

2018-02-14 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2018-02-14 18:59, Omacht András aoma...@mve.hu [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

Re: [firebird-support] How to return a IDENTITY field before insert it?

2018-02-14 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2018-02-14 18:32, Elton Fadel galdari...@yahoo.com.br [firebird-support] wrote: > I don't know why identity is better then the old method, but if we > can't have access to the next number, this can be useless in some > cases. > How to get it like we did on FB 2.5 with a procedure to get the nex