In Oracle Database, the CASE
statement compares a list of conditions and returns one of multiple possible expressions.
Oracle Database’s CASE
statement is very similar to the CASE
expression (which is defined in the SQL standard (ISO/IEC 9075)). However, Oracle supports both the CASE
expression and the CASE
statement, and there’s a distinction between the two. The CASE
statement can be used to execute of a sequence of PL/SQL statements, whereas the CASE
expression returns a single value. Also, there’s a difference in how they deal with the lack of an ELSE
clause when a condition is not met.