Today we learned the following: “When using a sequence in a MERGE statement, the nextvalue is generated for all rows both updated and inserted (hence all rows in the source).” Our initial reaction was that this must be a bug, but is it really?
Personal info
My tweets:
Fetch Tweets: Could not authenticate you. Code: 32Java
Oracle
Oracle Blogs
-
Recent Posts
- Strange behavior with EBR II
- Strange behavior with EBR
- Testing solution to MERGE with sequence NEXTVAL
- Strange behavior in MERGE with sequence NEXTVAL
- Use default parameter/setting (row) if not set specific for entity
- SQL Developer, Database Copy and TRUNCATING unwanted tables
- Copy schema with data pump when using editions
- The NUMBER datatype without precision
- Redundant NOT NULLs in DDL
- Java and JDBC for Oracle DBAs – Part 6: Spring-boot, JPA and Hibernate
Disclaimer
For the avoidance of any doubt, all views expressed here are my own and not those of past or current employers, clients, friends, Oracle Corporation, EVRY, my Mum or, indeed, my mother in law. If you want to sue someone, I suggest you pick on Tigger, but I hope you have a good lawyer. Frankly, I doubt any of the former agree with my views or would want to be associated with them in any way.