case when 呀
-------
case
when p_time < 8 then '8点之前'
when p_time >= 8 and p_time < 10 then '8-10点'
when p_time >= 10 and p_time < 12 then '10-12点'
when p_time >= 12 and p_time < 14 then '12-14点'
when p_time >= 14 and p_time < 16 then '14-16点'
when p_time >= 16 and p_time < 18 then '16-18点'
else '18点之后' end p_time_1 ,
参考