I filed DERBY-353 for BY DEFAULT identity issues. This seems slightly different:

Satheesh

ij> create table singleCol ( i int generated always as identity);
0 rows inserted/updated/deleted
ij> INSERT INTO SingleCol VALUES(DEFAULT);
1 row inserted/updated/deleted
ij> VALUES IDENTITY_VAL_LOCAL();
1
-------------------------------
NULL                                                        <=================== Wrong value here.
1 row selected
ij> create table doubleCol(i int generated always as identity, j int);
0 rows inserted/updated/deleted
ij> insert into doubleCol(j) values 1;
1 row inserted/updated/deleted
ij> VALUES IDENTITY_VAL_LOCAL();
1
-------------------------------
1                                                             <==================== Correct value here.
1 row selected
Daniel John Debrunner wrote:
Mamta Satoor wrote:

  
I think this might be a bug in Derby where VALUES IDENTITY_VAL_LOCAL();
returns null even after single row insert with values clause into table
with identity column. A Jira entry would be good to keep track of this.
    

Already there.

http://issues.apache.org/jira/browse/DERBY-353

Dan.



  

Reply via email to