Thank you.

I assume SCOPE_IDENTITY() was added for compatibility with other databases. Is this behavior (only reflecting sequence values) consistent with that? Or do you need to open a bug report to improve its compatibility? (I'm happy to simply use IDENTITY() but others might care)

Gili

On 03/07/2014 3:04 AM, Noel Grandin wrote:
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