标题: oracle时间分区示例 [打印本页] 作者: 张兴康 时间: 2020-4-26 18:12 标题: oracle时间分区示例 with t as
(select '1' as rdx,
to_date('20150101', 'yyyy-mm-dd') as sdt,
to_date('20150531', 'yyyy-mm-dd') as edt
from dual)
select rdx as ctrdx,
add_months(sdt, level - 1) as sdt,
last_day(add_months(sdt, level - 1)) as edt
from t
connect by level < months_between(edt, sdt) + 1
and prior rdx = rdx
and prior dbms_random.random <> 0 作者: 陈晓龙 时间: 2020-4-27 14:14 作者: 张兴康 时间: 2020-4-27 14:20