mysql if has value code example
Example 1: if inside select mysql
SELECT IF(1>3,'true','false');
Example 2: mysql use if on select
IF(expression ,expr_true, expr_false);
SELECT IF(1>3,'true','false');
IF(expression ,expr_true, expr_false);