1DECLARE
2 l_job_exists NUMBER;
3BEGIN
4 SELECT count(*) INTO l_job_exists FROM ALL_SCHEDULER_JOBS
5 WHERE JOB_NAME = 'job_name' AND OWNER = 'owner_name';
6 IF l_job_exists = 1 THEN
7 dbms_scheduler.drop_job(job_name => 'STATISTICS_COLUMNS_JOB');
8 END IF;
9END;