Oracle的定时器使用示例
程序员文章站
2024-01-30 21:22:04
...
Oracle的job每分钟执行一次存储过程。 无 --Oracle定时job--数据库执行此脚本时时,请确保只执行一次,否则会引发错误!declare job_id number; begin dbms_job.submit(job_id,'Reinsure_Writeback_Opdate;',sysdate,'sysdate+1/(24*60)'); commit; END;/--存
Oracle的job每分钟执行一次存储过程。--Oracle定时job --数据库执行此脚本时时,请确保只执行一次,否则会引发错误! declare job_id number; begin dbms_job.submit(job_id,'Reinsure_Writeback_Opdate;',sysdate,'sysdate+1/(24*60)'); commit; END; / --存储过程 create or replace procedure Reinsure_Writeback_Opdate as begin update WEB_RI_SETT_MAIN B set B.C_RP_FLAG = (select case when C.OPDATE is null then '0' else '1' end from web_fin_write_back C where C.BATCHNO = B.C_SETT_NO) where exists (select 1 from web_fin_write_back C where C.BATCHNO = B.C_SETT_NO); commit; end Reinsure_Writeback_Opdate;
推荐阅读