First page Back Continue Last page Image

A Stored Procedure CASE Statement

CASE expression

WHEN expression_value_1 THEN

code_to_run_if_match;

WHEN expression_value_2 THEN

code_to_run_if_match;

WHEN expression_value_3 THEN

code_to_run_if_match;

ELSE

code_to_run_if_no_match;

END CASE;

I like to think of this as the Coin Bank Statement

Notice, this is not based on a boolean expression