SQL is the standard language for Database Management System. It is used for storage, manipulation and retrieval of data in databases. There are so many features in MySQL that make our task so easy. So, In this tutorial we will be discussing one such feature called Case Statement in MySQL.
The CASE statement consists of a series of conditions. It works like an if then else statement. So, the CASE statement returns a value when the first statement is true. Once a condition is true, it will stop reading and processing further and will return the result. If none of the given statements or conditions is true then the value in the ELSE clause will be returned.
In many cases, there’s not any ELSE clause and when none of the conditions are true and we don’t even have an ELSE clause, then NULL is returned. It’s one of the most fun and important topics to learn in MySQL. To know more about this amazing concept which makes our work so easy and interesting, Watch the complete tutorial.