hvie case when 使用
2016-07-20 19:14
267 查看
注意:必须要把case when 链接在一起使用
select
case
when
length(temp5.arrive_datetime)>4 then 'y'
when
length(temp5.arrive_datetime)<3 then 'n'
else 'n'
end
from t_test2;
select
case
when
length(temp5.arrive_datetime)>4 then 'y'
when
length(temp5.arrive_datetime)<3 then 'n'
else 'n'
end
from t_test2;