How to Work Around ORA-38104: Columns referenced in the ON Clause cannot be updated

Standard SQL is a beautiful language. Vendor specific implementations, however, have their warts. In Oracle, for example, it's not possible to update any columns in a MERGE statement, which have been referenced by the ON clause. For example: CREATE TABLE person ( id NUMBER(18) NOT NULL PRIMARY KEY, user_name VARCHAR2(50) NOT NULL UNIQUE, score NUMBER(18) … Continue reading How to Work Around ORA-38104: Columns referenced in the ON Clause cannot be updated