b. Searched CASE
Searched CASE statement, introduced in version 8.1, allowed the use of operators like > and BETWEEN (eliminating most contortions) and allowed different values to be compared in different branches of the statement (eliminating most nesting), according to PL/SQL expert Frank Kulash.
Before version 8.1, the DECODE was the only thing providing IF-THEN-ELSE functionality in Oracle SQL. Because DECODE can only compare discrete values (not ranges), continuous data had to be contorted into discreet values using functions like FLOOR and SIGN.
Furthermore, in version 9.0, Oracle introduced the simple CASE statement, which reduces some of the verbosity of the CASE statement, but also reduces its power compared to DECODE.
For More Information
Expert response: PL/SQL and CASE
Expert response: Using CASE to obtain conditional SUMs
Best Web Links: SQL
Best Web Links: PL/SQL
Ask the Experts: Ask Frank Kulash for help working with SQL and PL/SQL statements.
Do you have an idea for a quiz question topic? Let us know!