1、取系统时间
select sysdate from dual;
2、按月取每月的最后一天
select last_day(add_months(to_date('2015-04-01', 'yyyy-mm-dd'),
(rownum - 1))) +numtodsinterval('18', 'hour')
from dual
connect by rownum <= 15;
3、按月取每月的一天
select (add_months(to_date('2015-04-01', 'yyyy-mm-dd'),
(rownum - 1))) +numtodsinterval('18', 'hour')
from dual
connect by rownum <= 15;
4、取单独的一天
select to_date('2015-02-26', 'yyyy-mm-dd') from dual ;
5、取单独的时间段
select (to_date('2015-02-26', 'yyyy-mm-dd')+rownum)+
numtodsinterval('18', 'hour') from dual connect by rownum <= 4;