I have a simple INSERT query where I need to use UPDATE instead when the primary key is a duplicate. In MySQL this seems easier, in Oracle it seems I need to use MERGE.
A typical way of doing this is
You can't write a trigger on a table that does another operation on the same table. That's causing an Oracle error (mutating tables).