I have an Oracle (11gR2) Package MyPack1 that has a procedure Cal_All and this calls 4 different independent procedures.
I have put the sample content of the procedure MyPack1.
I wanted to know:
-- I want MyPack1 to exit the procedure immediately if any EXCEPTION happens. Do I use "Rollback;" or "Exit" under the procedure MyPack1 ? In both situations: when I need to rollback and when I do not need to rollback..?
-- Also in the package MyPack1 , how do I ensure that if MyProc1 got some EXCEPTION, it exits MyPack1 immediately and does not go to MyProc2. And likewise if MyProc2 got some EXCEPTION, it does not execute MyProc3 and so on..
CREATE OR REPLACE PACKAGE BODY MyPack1 IS
PROCEDURE Cal_All AS
create or replace procedure MyProc1
... do some stuff
-- your update
exception when others then
...--I want to EXIT;
... do more stuff