Answers for "oracle create job if not exists"

SQL
0

oracle create job if not exists

DECLARE
    l_job_exists NUMBER;
BEGIN
    SELECT count(*) INTO l_job_exists
    FROM all_scheduler_jobs WHERE job_name = 'job_name' AND OWNER = 'owner';
    IF l_job_exists = 1 THEN
        dbms_scheduler.drop_job(job_name => 'job_name');
    END IF;
END;
/
BEGIN DBMS_SCHEDULER.CREATE_JOB(job_name => '"owner"."job_name"', ...); END;
Posted by: Guest on August-27-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language