SQL: CASE expression reference
19 March 2023 (Updated 22 October 2023)
In a nutshell
The MySQL CASE expression is used to evaluate conditions and return a result based on the result of those conditions. The CASE expression can take two forms: simple and searched.
1. Simple CASE expression
Example
Example
2. Searched CASE expression
Syntax
Example
Tagged:
MySQL
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment