db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Questions on auto incremental column IDENTITY_VAL_LOCAL()
Date Thu, 13 Sep 2007 09:09:01 GMT
Ivan Ooi <olibralo@gmail.com> writes:

> Hi all,
>
>    I got one question about auto incremental column and
> IDENTITY_VAL_LOCAL().
> Let says, I got 3 connections doing insert at the same time on one of the
> table with an auto incremental column.
> Will Derby able to return correct value back to each client using
> IDENTITY_VAL_LOCAL() ?

Yes, Derby will return the correct value to each
client. IDENTITY_VAL_LOCAL() returns the most recently generated
identity value in a single-row insert on the same connection, and the
return value should not be affected by concurrent activity on other
connections.

For details, see
http://db.apache.org/derby/docs/10.3/ref/rrefidentityvallocal.html

-- 
Knut Anders

Mime
View raw message