db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Jefferson (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-439) IDENTITY_VAL_LOCAL() returns null after INSERT INTO table VALUES(DEFAULT)
Date Tue, 05 Jul 2005 17:42:29 GMT
IDENTITY_VAL_LOCAL() returns null after INSERT INTO table VALUES(DEFAULT)
-------------------------------------------------------------------------

         Key: DERBY-439
         URL: http://issues.apache.org/jira/browse/DERBY-439
     Project: Derby
        Type: Bug
    Versions: 10.0.2.1    
 Environment: Mandriva 2005 Linux. Derby 10.0.2.1
    Reporter: Andy Jefferson


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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message