Synopsis
Simple case:Description
TheCASE statement is an optional construct to allow conditional processing
in SQL routines.
The WHEN clauses are evaluated sequentially, stopping after the first match,
and therefore the order of the statements is significant. The statements of the
ELSE clause are executed if none of the WHEN clauses match.
Unlike other languages like C or Java, SQL does not support case fall through,
so processing stops at the end of the first matched case.
One or more WHEN clauses can be used.
Examples
The following example shows a simpleCASE statement usage:
CASE statement
in combination with other statements are available in the SQL routines examples
documentation.