📌  相关文章
📜  oracle 删除作业(如果存在) - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:08.129000             🧑  作者: Mango

代码示例1
DECLARE
    l_job_exists NUMBER;
BEGIN
    SELECT count(*) INTO l_job_exists FROM ALL_SCHEDULER_JOBS
    WHERE JOB_NAME = 'job_name' AND OWNER = 'owner_name';
    IF l_job_exists = 1 THEN
        dbms_scheduler.drop_job(job_name => 'STATISTICS_COLUMNS_JOB');
    END IF;
END;