Assertion: exception | /r/CapableOf | occur rollback
Facets:
Source sentences:
text: An application should always handle any exception that results from execution of a PL/SQL block, as in the following example, run with autocommit disabled: create table mytable (num int not null primary key); set serveroutput on insert into mytable values(1); begin insert into mytable values(2); insert into mytable values(1); exception when dup_val_on_index then dbms_output.put_line('oops:' || sqlerrm); rollback; end; select * from mytable; commit; The second INSERT fails because values must be unique, so an exception occurs and the program performs a rollback.