I'm trying to insert a record into H2 database, if it is absent. If it is present, I want to ignore the entire operation. Is it possible? I've seen MERGE command, but can't figure out how it can help, since it updates a record in any case.
Asked
Active
Viewed 985 times
0
-
It's not possible to do _nothing_ with an H2 MERGE statement. It always updates existing rows. – Nov 29 '15 at 21:33
-
@eis as far as I understand, `MERGE` will update the record, if it exists. But I don't need that, as my question explains. I don't need any changes to happen when the record exists. Do I miss something? – yegor256 Nov 29 '15 at 23:16
-
@yegor256 yes, I agree on that. I think I misunderstood the comment by a_horse_with_no_name, which is why I deleted my comment. – eis Nov 29 '15 at 23:18