Multiple choice

In a PL/SQL 'case' statement, if all the given conditions are false, the statements written in the ____ block are executed.

  1. default

  2. else

  3. case

  4. otherwise

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The 'case' statement is a conditional statement like the 'if-else' statement. It contains both the conditions and the statements that are processed if the condition is true. A 'case' statement can have as many 'cases' or statements as required. If all specified conditions in the 'case' statement are false, the control automatically transfers to the 'else' part. Although optional, the 'else' part will be processed if none of the conditions above is true.