> lang > select | ![]() |
| Documentation |
|
SELECT [ CASE ] Expression
[ CASE Expression [ TO Expression #2 ] [ , ... ] ... ]
[ CASE Expression [ TO Expression #2 ] [ , ... ] ... ]
[ { CASE ELSE | DEFAULT } ... ]
END SELECT
Selects an expression to compare, and execute the code enclosed in the corresponding matching CASE statement.
If no CASE statement matches, the DEFAULT or CASE ELSE statement is executed.
A CASE statement is a list of single values or interval of two values separated by the TO keyword.