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?



I have a parent program and a child program. I want to write a statement in Exception Block of the ..

Answer / 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

More Oracle General Interview Questions

What is a named program unit?

1 Answers  


What is the purpose of a cluster?

1 Answers  


why should i declare foreign key constraint as self relation instead of binary relation in tables ?

1 Answers   Oracle,


Why use resource manager in Oracle?

1 Answers   MCN Solutions,


What is OCI. What are its uses?

1 Answers  


What is BBED in Oracle?

1 Answers   MCN Solutions,


What to do if the binary spfile is wrong for the default instance?

1 Answers  


How to use attributes of the implicit cursor in oracle?

1 Answers  


What is a Private Synonyms ?

1 Answers  


You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces?

1 Answers  


What is the relation of a user account and a schema in oracle?

1 Answers  


What is pragma autonomous transaction in oracle?

1 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1803)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)