create or replace procedure SQ_TEST_PROC is
dateStart date; --开始时间dateEnd date; --结束时间
begin
dateStart := sysdate;
dateEnd := sysdate - 10;
loop
if dateStart < dateEnd then
exit; --break跳出循环 return 跳出存储过程
else
--dbms_output.put_line(sqlerrm);
dbms_output.put_line(to_char(dateStart,'yyyy-mm-dd'));
STO_ACCOUNT_AGENT_PROC(to_char(dateStart,'yyyy-mm-dd'));
dateStart := dateStart - 1;
end if;
end loop;
end SQ_TEST_PROC;