Answers for "how to use if statement in mysql query"

SQL
0

mysql if else

SELECT OrderID, Quantity, 
CASE WHEN Quantity > 10 THEN "MORE" ELSE "LESS" END as x
FROM OrderDetails;

SELECT OrderID, Quantity, 
IF (Quantity > 10, "MORE", "LESS") as x
FROM OrderDetails;
Posted by: Guest on October-18-2021

Code answers related to "how to use if statement in mysql query"

Code answers related to "SQL"

Browse Popular Code Answers by Language