Say I have an Oracle PL/SQL block that inserts a record into a table and need to recover from a unique constraint error, like this:
begin insert into some_table ('some', 'values'); exception when ... update some_table set value = 'values' where key = 'some'; end;
Is it possible to replace the ellipsis for something in order to catch an unique constraint error?
EXCEPTION WHEN DUP_VAL_ON_INDEX THEN UPDATE
1.4m articles
1.4m replys
5 comments
57.0k users