20190122 loop

declare

   a number;

   v_begin date := to_date('201901013','yyyymmdd');

   v_end date := to_date('20190119','yyyymmdd');

   v_date date;

   v_use varchar2(10);

begin

   select v_end-v_begin into a from dual;

   v_date :=v_begin;

   for i in l.. a LOOP

   v_use:=to_char(v_date,'YYYYMMDD');

   dbms_output.put_line(v_use);

   v_date:=v_begin + i ;

   END LOOP;

end;

posted @ 2019-01-22 11:30  soar.pang  阅读(105)  评论(0编辑  收藏  举报