Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> help with commits and rollbacks in PL/SQL
Hello,
I have a question about exceptions in PL/SQL. I was under the impression
that if an exception is raised a rollback is perfromed. However this is not
the case. If I have a function a table called foo and a function called
update foo as follows:
create table foo(id number);
create or replace function insert_foo
return number
is
my_exception EXCEPTION;
begin
insert into foo values(1); raise my_exception; insert into foo values(2); return 0; exception when my_exception then return -1; when others then return -3;