HI Everybody ,
This is the DB2 performance issue I was referring to .
We have requirement where we need to insert some values to the DB2
table and
get back its ID. Its possible by using an insert query , followed by
select
ID query. (Using IDENTITY_LOCAL_VAR)
However what we are looking for is (ofcourse, an ideal case) a single
query
which performs insert and returns sequence generated. (To adress some
performance bottlenecks)
My experience with this kind of thing is with Oracle and in those
cases, the
new sequence/identity is returned as part of the result object itself
(i.e.
you don't need to query the database again).
If there is any similar construct in DB2, it would be of greater help.
Thanks in Advance