jnch.net
当前位置:首页 >> mysql类似于JAVA中switCh CAsE用法的语法 >>

mysql类似于JAVA中switCh CAsE用法的语法

mysql不太熟,不过你的要求就是简单嵌套就行了吧。 select @sum_rece:=s1+s2+s3+s4...+s10 from ( select (case when rece_day1 is null then rece_amt1 else 0) s1, (case when rece_day2 is null then rece_amt2 else 0) s2, 。。。。 from ...

mysql的case 就是 类似switch的用法, SELECT id,case status WHEN '0' then '审核中' WHEN '1' then '通过' WHEN '3' then '禁用' end as "status" from tp_user if的用法: select *,if(sex=1,"男","女") as sex from tp_user

网站首页 | 网站地图
All rights reserved Powered by www.jnch.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com