0
点赞
收藏
分享

微信扫一扫

oracle 获取当前季

双井暮色 2022-06-30 阅读 58
方法1:
SELECT
CASE WHEN to_number(to_char(sysdate,'mm'),99) <4 then '春季'
when to_number(to_char(sysdate,'mm'),99) between 4 and 6 then '夏季'
when to_number(to_char(sysdate,'mm'),99) between 7 and 9 then '秋季'
ELSE '冬季' END CASE
from dual

方法2:
select trunc(sysdate,'q') from dual
举报

相关推荐

0 条评论