Hi, > I realize the H2 merge statement can do something similar. However, many of > my tables have identity on the primary key and I can't get merge to work > without specifying the primary key identity value before hand, which defeats > the convenience of identity.
Merge supports an optional 'key'. If you want to create a new identity value, you could insert NULL or not specify ID: drop table test; create table test(id identity, name varchar); merge into test(id, name) key(name) values(32, 'Other Payables'); merge into test(id, name) key(name) values(32, 'Other Payables'); merge into test(id, name) key(name) values(NULL, 'Test'); select * from test; Regards, Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
