Episode 3 | HD Tomb Raider (2018) | Drben bei Lehmanns (1)
 Examples for business, study, careers, love, and more...
Examples :: MYSQL Examples :: Example of Case Mysql statement

Popular Examples

More MYSQL Examples

See all MYSQL Examples
report this ad

Example of Case Mysql statement:

CREATE PROCEDURE p()
BEGIN
DECLARE v INT DEFAULT 1;
CASE v
WHEN 2 THEN SELECT v;
WHEN 3 THEN SELECT 0;
ELSE
BEGIN
END;
END CASE;
END;

Example of Mysql Case

CASE case_value
WHEN when_value THEN statement_list
[WHEN when_value THEN statement_list] ...
[ELSE statement_list]
END CASE

Or:

CASE
WHEN search_condition THEN statement_list
[WHEN search_condition THEN statement_list] ...
[ELSE statement_list]
END CASE