Home »
PL/SQL MCQs
What is/are the correct restriction(s) on GOTO statement?
56. What is/are the correct restriction(s) on GOTO statement?
- A LOOP statement or sub-block cannot be used as an IF statement, CASE statement, or LOOP statement.
- A CASE statement WHEN clause or an IF statement clause cannot transfer control to another.
- No control can be transferred between outer blocks and sub-blocks.
- All of the above
Answer: D) All of the above
Explanation:
The restrictions on the GOTO statement are –
- A LOOP statement or sub-block cannot be used as an IF statement, CASE statement, or LOOP statement.
- A CASE statement WHEN clause or an IF statement clause cannot transfer control to another.
- No control can be transferred between outer blocks and sub-blocks.
- A subprogram cannot be controlled by a parent program.
- An exception handler cannot take control.