Created
September 3, 2015 06:32
-
-
Save Brutt/6492febed62d5be37c1b to your computer and use it in GitHub Desktop.
rollback_in_loop_1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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