日期:2014-05-16 浏览次数:20592 次
select ceil(months_between(add_months(sysdate,1),sysdate)) from dual;
select to_char(to_date('2011-02-08', 'yyyy-mm-dd')+7*(rownum-1) ,'yyyy-mm-dd') a , to_char(case when to_date('2011-02-08', 'yyyy-mm-dd')+7*(rownum-1)+6>sysdate then sysdate else to_date('2011-02-08', 'yyyy-mm-dd')+7*(rownum-1)+6 end ,'yyyy-MM-dd') as b from all_objects where rownum<=floor((sysdate - (to_date('2011-02-08', 'yyyy-mm-dd'))) / 7)+1