类似于三元运算符
1) IF(where,result1,result2) = where?result1:result2
例如 SELECT IF(1=1,1,2) => 1
2) IFNULL(result1,result2) = result1 is not null?result1:result2
例如 SELECT IF(1,2) => 1
SELECT IF(null,2) => 2
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/4484.html