Skip to content

Instantly share code, notes, and snippets.

@Brutt
Created September 3, 2015 06:32
Show Gist options
  • Save Brutt/6492febed62d5be37c1b to your computer and use it in GitHub Desktop.
Save Brutt/6492febed62d5be37c1b to your computer and use it in GitHub Desktop.
rollback_in_loop_1
declare
i integer;
begin
insert into tbl_1
(id1)
values
(1);
for s in (SELECT t.* FROM all_objects t where rownum < 3) loop
begin
insert into tbl_2
(id2)
values
(1);
i := 7 / (2-2);
exception
when others then
rollback;
dbms_output.put_line(SQLERRM);
end;
end loop;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment