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 next
> ID of a generator?

I can't think of any reason why you would ever need to get the value of 
an identity column before the insert. The whole point of an identity 
column is to generate the value on insert without using other tricks. 
Just use INSERT (<non-id-columns>) values (...) RETURNING <id-column> to 
get the value as generated on insert.

If you do have a use case, then that is a case where you should not use 
an identity column at all, but instead you should use a plain sequence 
(generator).

Mark
  • [firebi... Elton Fadel galdari...@yahoo.com.br [firebird-support]
    • Re... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
    • Re... Omacht AndrĂ¡s aoma...@mve.hu [firebird-support]
      • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
        • ... Elton Fadel galdari...@yahoo.com.br [firebird-support]
          • ... Arnaldo Caliari arnaldo.cali...@studiosoft.info [firebird-support]
            • ... Norman Dunbar nor...@dunbar-it.co.uk [firebird-support]
            • ... Helen Borrie hele...@iinet.net.au [firebird-support]
              • ... Arnaldo Caliari arnaldo.cali...@studiosoft.info [firebird-support]
              • ... Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
              • ... hv...@users.sourceforge.net [firebird-support]
                • ... Ann Harrison aharri...@ibphoenix.com [firebird-support]

Reply via email to