oracle创建jobs定时任务报错:ora-01008:not all variables bound
原脚本(直接从jobs拖出生成的DDL):
begin
sys.dbms_job.submit(job => :job,
what => 'xxx;',
next_date => to_date('10-12-2019', 'dd-mm-yyyy'),
interval => 'TRUNC(SYSDATE + 1)');
commit;
end;
修改后(增加declare,删除“:job”的“:”):
declare
job number;
begin
sys.dbms_job.submit(job => job,
what => 'xxx;',
next_date => to_date('10-12-2019', 'dd-mm-yyyy'),
interval => 'TRUNC(SYSDATE + 1)');
commit;
end;