SCOPE_IDENTITY() appears to only reflect sequence values from the current 
statement.

I'll update the docs to this effect.

On 2014-07-02 05:56 PM, cowwoc wrote:
CREATE TABLE permission (id IDENTITY);
CREATE TABLE users (id IDENTITY, version INT NOT NULL, last_modified TIMESTAMP 
NOT NULL,
     insert_permission_id BIGINT NOT NULL);
INSERT INTO permission VALUES();
INSERT INTO users (version, last_modified, insert_permission_id) VALUES (0, 
NOW(), SCOPE_IDENTITY());

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to