How do i go about this? Is the RAISE a call to the myexception function, when there is an error? Here's what i think. I was wondering if someone could please tell me if my possible solution is right or not. Thank you.
(my possible solution)
John Doe, 111222333
David Wood, 333222111
Mary Jones, 222222222
Bruce Smith, 000000000
Drop table mytable;
Create table mytable (name varchar2(20), ssn char(9));
Declare
fun NUMBER;
myexception EXCEPTION;
begin
begin
begin
insert into mytable values('John Doe', '111222333');
RAISE myexception;
end;
insert into mytable values('David Wood', '333222111');
COMMIT;
fun := 5/0;
begin
insert into mytable values('Mary Jones', '222222222');
RAISE myexception;
end;
EXCEPTION
WHEN others THEN
insert into mytable values('Larry Young', '999999999');
end;
insert into mytable values('Bruce Smith', '000000000');
EXCEPTION
WHEN myexception THEN
insert into mytable values('Andrew Lee', '888888888');
end;
/
Give the rows in table mytable after the execution of the above anonymous PL/SQL block.