Answers for "mysql trigger if else if"

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
0

MySQL IF without else

SELECT * FROM callback LEFT JOIN agent ON callback.agent_ID=agent.agent_ID 
	LEFT JOIN contact ON callback.contact_ID=contact.contact_ID WHERE callback.agent_ID =118
	AND DATE(callback.cb_dt) =curdate() 
    and Hour(time(callback.cb_dt)) <= Hour(time(UTC_TIMESTAMP()))
    and 
	(if(Hour(time(callback.cb_dt)) = Hour(time(UTC_TIMESTAMP())),
     minute(time(callback.cb_dt)) < minute(time(UTC_TIMESTAMP())) and
    cb_IsDeleted=0 ,cb_IsDeleted=0))
	and callback.isCalled=0;
Posted by: Guest on October-04-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language