Oracle Database: Advanced PL/SQL — Question 63
Which is true about EXIT and CONTINUE statements?
Answer options
- A. They can be used in any type of loop.
- B. They must have a WHEN condition.
- C. They have the same effect on the execution of a loop.
- D. They must use labels.
Correct answer: A
Explanation
The correct answer is A, as both EXIT and CONTINUE statements can indeed be used in various types of loops. Option B is incorrect because these statements do not necessarily need a WHEN condition. Option C is also wrong because EXIT and CONTINUE affect loop execution differently; EXIT terminates the loop while CONTINUE skips to the next iteration. Lastly, option D is incorrect since labels are not required for these statements.