DBMS_SCHEDULER.DROP_JOB only if exists
问题 I have a sql script that I must run after I import a dump. among other things the script does, it does the following: BEGIN --remove program SYS.DBMS_SCHEDULER.DROP_PROGRAM(program_name=>'STATISTICS_COLUMNS_PROG',FORCE=>TRUE); --remove job SYS.DBMS_SCHEDULER.DROP_JOB (job_name => 'STATISTICS_COLUMNS_JOB'); END; Somtimes the job was already dropped in the original schema, the dump comes without the job and the script fails: ERROR at line 1: ORA-27475: "DMP_6633.STATISTICS_SET_COLUMNS_JOB" must