--可重复执行dml
delete test_001 t where t.id='123'
insert into test_001 t (t.id,t.name) values ('','');
--可重复执行ddl;oracle的job提交,提交前如果该job在执行,则移除
declare
v_job_01 number;
jobnum number;
isExist number;
begin
select count(1) into isExist from dba_jobs t where t.LOG_USER='system'
and t.WHAT='dbms_repcat_auth.test_01;';
if isExist>0 then
select job into jobnum from dba_jobs t where t.LOG_USER='system'
and t.WHAT='dbms_repcat_auth.test_01;';
if jobnum>0 then
dbms_job.broken(jobnum,true);
dbms_job.remove(jobnum);
end if;
end if;
dbms_job.submit(v_job_01,'dbms_repcat_auth.test_01;',sysdate+1/60/24,
'system+1/60/24');
commit;
end;
/