if(条件,true,false); if 条件 then else end if; ifnull(1,2) ##1为空就返回2 nullif(1,1) ##两个相同返回null case when 条件 then 值 else 值 end case ##可以限制条件,像switch