Q
Which expression is the ANSI-standard way to apply conditional logic in a SELECT?
-
A
IF ... THEN ... ENDIF
-
B
WHEN ... SWITCH ... END
-
C
CHOOSE ... WHEN ... DONE
-
D
CASE WHEN ... THEN ... ELSE ... END
Correct Answer:
D. CASE WHEN ... THEN ... ELSE ... END
Explanation:
CASE works in both SQL and PL/SQL and ends with END.