Hive中case when的两种语法
转自:https://blog.youkuaiyun.com/ygdlx521/article/details/71156354
总结一下:两种表达方式是等效的
方法一:
case
when tb1.os = 'android' then 'android'
when tb1.os = 'ios' then 'iPhone'
else 'PC'
end as os,
方法二:
case tb1.os
when 'android' then 'android'
when 'ios' then 'iPhon
转载
2020-07-29 23:24:33 ·
314 阅读 ·
0 评论