在oracle DB 中通过JOB 调用存储过程:
create or replace procedure addage
is
begin
insert into test_work_age(work_age_id, work_age_code, work_age_name, created_date)
values(5,6,'114','');
end addage;
-----------------------
DECLARE
X NUMBER;
BEGIN
DBMS_JOB.SUBMIT
( job => X --job name
,what => 'addage;' --procedure name
,next_date => to_date('26-05-2007 08:00:00','dd/mm/yyyy hh24:mi:ss') --第一次执行时间
,interval => 'SYSDATE+5/1440' --下次执行的时间间隔
,no_parse => TRUE
);
DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
END;