--创建存储过程
create or replace procedure delete_Clue_zp
as
begin
delete from sj_clue_zp t where t.xsbh is null and t.sj is null ;
delete from sj_cluessgg_zp g where g.sfzh is null and g.xm is null;
commit;
end;
--创建定时器job (说明:当前时间下一天凌晨开始执行,每一个月重复执行一次)
declare
delete_clue_zp_job number;
begin
dbms_job.submit(delete_clue_zp_job,'delete_Clue_zp;',trunc(sysdate+1),'TRUNC(LAST_DAY(SYSDATE ) + 1)');
end;