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