摘要:
--case when用法
select
case
when cast(strftime('%H','now','localtime') as int) >= 6 and cast(strftime('%H','now','localtime') as int) <=12 then '上午'
when cast(strftime('%H','now','localtime') as int) >12 and cast(strftime('%H','now','localtime') as int) <=18 then '下午'
when cast(strftime('%H','now','localtime') as int) >18 and cast(strftime('%H','now','localtime') as int) <=23 then '晚上'
else '凌晨' end; 阅读全文
posted @ 2016-04-27 15:14
gdjlc
阅读(2373)
评论(0)
推荐(0)

浙公网安备 33010602011771号