Details
Description
I have a table as follows
CREATE TABLE MYTABLE
(
MYTABLE_ID BIGINT NOT NULL generated always as identity (start with 1)
)
and then I issue
INSERT INTO MYTABLE VALUES (DEFAULT);
followed by
VALUES IDENTITY_VAL_LOCAL();
This returns null!
If instead my table was
CREATE TABLE MYTABLE
(
MYTABLE_ID BIGINT NOT NULL generated always as identity (start with 1),
NAME VARCHAR(20) NULL
)
and I then issue
INSERT INTO MYTABLE ("NAME") VALUES ("NEW NAME");
followed by
VALUES IDENTITY_VAL_LOCAL();
I get the value assigned to the identity column correctly.
Attachments
Issue Links
- relates to
-
DERBY-353 It is desirable to have IDENTITY_VAL_LOCAL() function return last recent user specified value or system generated value for BY DEFAULT identity columns.
- Closed