declare
job_number number;
begin
sys.dbms_job.submit(job => job_number, --创建JOB成功后返回的JOB编号(out参数)
what => ‘INSERT INTO WEB_BAS_FIN_CHG_RATE
SELECT * FROM ZSSYS.WEB_BAS_FIN_CHG_RATE@LINK_CORE
WHERE T_CRT_TM > TRUNC(SYSDATE,‘‘MM‘‘)-3;‘, --执行内容:同步上个月最后三天创建的汇率(注意有分号)
next_date => TRUNC(LAST_DAY(SYSDATE) + 1 + 1 / 24), --下次执行时间:下个月初零时执行
interval => ‘TRUNC(LAST_DAY(SYSDATE) + 1+1/24)‘ --执行间隔:每月初零时执行
);
end;
SELECT * FROM dba_jobs;