- 概述:
if举例:
如果conm等于null,就返回0,否则返回conm
使用if参与运算,这样就避免了conm为null时候,无法参与运算的情况
- ifnull举例:
- select case when expr1 then expr1_res when expr2 then expr2_res else expr3 end;(可以继续添加when … then…)
类似 if elif elif else
mysql 学习笔记 11过程控制
最新推荐文章于 2020-10-05 13:14:16 发布