Question:

Which of the following is NOT a valid PL/SQL control statement?

Show Hint

While many programming languages use aswitch` statement for multi-way branching, remember that PL/SQL (and standard SQL) uses theCASE` statement for this purpose.
Updated On: Jul 2, 2026
  • IF-THEN-ELSE
  • CASE
  • LOOP
  • SWITCH
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

PL/SQL (Procedural Language/SQL) is Oracle's procedural extension for SQL. It includes standard procedural language constructs for control flow.
Valid PL/SQL control statements include:
Conditional Control: (A)IF-THEN-ELSE`,IF-THEN-ELSIF` statements. (B)CASE` statements andCASE` expressions. Iterative Control (Loops): (C) BasicLOOP`,FOR LOOP`, andWHILE LOOP`. Sequential Control: GOTO` statement.
TheSWITCH` statement is a common control structure in languages like C, C++, Java, and C#. However, it is not a valid control statement in PL/SQL. The equivalent functionality in PL/SQL is provided by theCASE` statement.
Therefore, SWITCH is not a valid PL/SQL control statement.
Was this answer helpful?
0
0