MYSQL IF column return something code example
Example 1: mysql select if zero
SELECT IF((SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' END),'true','false');
Example 2: mysql use if on select
IF(expression ,expr_true, expr_false);
SELECT IF((SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' END),'true','false');
IF(expression ,expr_true, expr_false);