时间:2021-07-01 10:21:17 帮助过:3人阅读
select to_char(t, ‘yyyymm‘) a, to_char(t, ‘yyyy-mm‘) b, to_char(t, ‘dd‘) c from ( select decode(level, 1, trunc(sysdate, ‘dd‘), add_months(trunc(sysdate, ‘mm‘), 2 - 1 * level) - 1) t from dual connect by level < 7 )
当月显示实际天数,非整月天数:
oracle造最近6个月及每月天数SQL
标签: