db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [Fwd: Help with Identity_Val_Local() and DERBY-353]
Date Wed, 27 Jul 2005 17:06:33 GMT
Shreyas Kaushik wrote:

> Some pointers need for Narayanan here.
> 
> thanks
> Shreyas
> 
> ------------------------------------------------------------------------
> 
> Subject:
> Help with Identity_Val_Local() and DERBY-353
> From:
> V Narayanan <V.Narayanan@Sun.COM>
> Date:
> Wed, 27 Jul 2005 18:51:19 +0530
> To:
> sun-derby-discuss@Sun.COM
> 
> To:
> sun-derby-discuss@Sun.COM
> CC:
> Shreyas Kaushik <Shreyas.Kaushik@Sun.COM>, Amit Handa <Amit.Handa@Sun.COM>
> 
> 
> Hi,
> I had a few doubts regarding the working of the identity_val_local
> function.
> 
> An insert statement containing --generated by default as identity-- does
>  a getSetAutoincrementValues to get and set values from the SYSCOLUMNS
> table. so in effect it takes the identity column value from the
> SYSCOLUMNS table.
> 
> The identity_val_local() function returns the last single statement
> insert value for the identity column.

There are additional semantics for identity_val_local(), you need to add
'for the current connection (session)' to the end of your definition.

Dan.



Mime
View raw message