Answers for "oracle create program if not exists"

SQL
1

oracle create program if not exists

DECLARE
    existing_program NUMBER;
BEGIN
    SELECT count(*) INTO existing_program
    FROM ALL_SCHEDULER_PROGRAMS WHERE PROGRAM_NAME = 'prog_name' AND OWNER='owner';
    IF existing_program = 1 THEN
        dbms_scheduler.DROP_PROGRAM(PROGRAM_NAME => 'prog_name');
    END IF;
END;
/
BEGIN DBMS_SCHEDULER.create_program(program_name => 'owner.prog_name', ...); END;
Posted by: Guest on August-27-2021

Code answers related to "oracle create program if not exists"

Code answers related to "SQL"

Browse Popular Code Answers by Language