Shreyas Kaushik wrote: > Some pointers need for Narayanan here. > > thanks > Shreyas > > ------------------------------------------------------------------------ > > Subject: > Help with Identity_Val_Local() and DERBY-353 > From: > V Narayanan <[EMAIL PROTECTED]> > Date: > Wed, 27 Jul 2005 18:51:19 +0530 > To: > [EMAIL PROTECTED] > > To: > [EMAIL PROTECTED] > CC: > Shreyas Kaushik <[EMAIL PROTECTED]>, Amit Handa <[EMAIL PROTECTED]> > > > 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.
