一个oracle存储过程的示例:
CREATE OR REPLACE PROCEDURE FOR_QQ_ANALISE_BY_JESEECHEN(statis_date IN VARCHAR2) AS
today date;
i number(11);
BEGIN
DBMS_OUTPUT.enable;
DBMS_OUTPUT.PUT_LINE(statis_date);
today := to_date(statis_date, 'yyyy-mm-dd');
Dbms_Output.put_line(today);
i := 0;
while i < 20 loop
today := today - 1;
DBMS_output.put_line( to_char(today, 'yyyy-mm-dd' ) );
i := i + 1;
end loop;
COMMIT;
END;