We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
In MySql, CASE statement acts like a "if" condition, so if the expression after CASE statement matches the boolean value after WHEN clause, it executes the result after THEN clause; otherwise it will execute result after ELSE clause.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Report
You are viewing a single comment's thread. Return to all comments →
Hello @kaikumar30, let me reframe that above query for you:
In MySql, CASE statement acts like a "if" condition, so if the expression after CASE statement matches the boolean value after WHEN clause, it executes the result after THEN clause; otherwise it will execute result after ELSE clause.