Mysql中select条件取值写法

if(condition, a, b)

select sum(if(user_id>0, 1, 0)) as reigistered_count from order

case when condition then [A] else [B] end

select case grade>9 then '初中' else '小学' end as grade from student
上一篇:Mysql关键字和保留字(注意)


下一篇:Python 学习 02:语句