adspace


I have a parent program and a child program. I want to write
a statement in Exception Block of the parent program so that
when the statement in the exception block is executed, the
control goes to the next statement in the parent block
bypassing the child block.How do i do that?

Answer Posted / Satendera Singh

In Oracle PL/SQL, you can use the 'RETURN' statement within an exception block to exit from the current procedure or function without executing any more code in the current block. To skip the child block and continue with the next statement in the parent block, you should throw an exception inside the exception block and handle it outside the child block.nnHere's a simple example:nnbeginn beginn -- Child Block that might raise an exceptionn exception when others thenn dbms_output.put_line('Exception occurred in child block');n return; -- Exit the procedure without executing any more code in the current blockn end;n -- Parent Block, continues execution after the child block if no exceptions were raised

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com

1955


How to write a left outer join with the where clause in oracle?

1152


How to use values from other tables in update statements using oracle?

1157


How to start an oracle instance?

1103


How to select all columns of all rows from a table in oracle?

1131


How to put more than 1000 values into an oracle in clause?

1114


Design database draw er diagram for a certain scenario ?

4655


What is oracle latest version?

1173