当前位置:   article > 正文

mysql case多个关键字 使用and 或者in()_mysql case in

mysql case in

mysql case多个关键字 使用and 或者in()

case
when count(0) = 1 and count(0) = 2 and count(0) =3) then ‘lv1’
when count(0) = 4 and count(0) = 5 and count(0) =6) then ‘lv2’
else ‘lv3’
end as pertime

case
when count(0) in (1, 2 ,3) then ‘lv1’
when count(0) in (4 , 5 , 6 )then ‘lv2’
when count(0) in (7 , 8 , 9 , 19 , 11 )then ‘lv3’
else ‘lv4’
end as pertime

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/485228
推荐阅读
相关标签
  

闽ICP备14008679号