From: Helen B. <he...@tp...> - 2010-12-26 04:48:23
|
At 12:22 PM 26/12/2010, Adriano dos Santos Fernandes wrote: >On 25-12-2010 19:58, Roman Rokytskyy wrote: >> >> We do not have the AUTO_INCREMENT data type, but I was thinking that for >> the most use cases (80/20 principle), storing the last value used in the >> gen_id(..) function in the context would do the trick. >> >I'd much prefer something like LAST_GEN_ID(<name>). Oracle has ><name>.curval, so it's like something a database-portable application >would be capable to use. What's wrong with SELECT GEN_ID (<name>,0) from rdb$database ? Does it need to be stored somehow (otherwise)? Surely poking it into a context variable is just lipstick. All transactions should get the "right" result, since it is independent of any other transactions. Helen |