MySQL CASE Operator is used for flow control. It is useful to create a complex conditional construct.
The Synatx is as follows :
CASE case_value
WHEN when_value THEN statement_list
[WHEN when_value THEN statement_list] ...
[ELSE statement_list]
END CASE
An example of MySQL CASE Operator is :
The Synatx is as follows :
CASE case_value
WHEN when_value THEN statement_list
[WHEN when_value THEN statement_list] ...
[ELSE statement_list]
END CASE
An example of MySQL CASE Operator is :
Refernce : MySQL CASE OPERATOR of w3resource MySQL Tutorial.

No comments:
Post a Comment