Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle create program if no 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;
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle create program if not exists 
Sql :: difference between where and having clause 
Sql :: how to get slow query log in mysql 
Sql :: postgres convert text to number 
Sql :: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client 
Sql :: oracle list of long running queries 
Sql :: mysql all columns 
Sql :: sql create table with datetime automatically 
Sql :: show all public tables sql 
Sql :: how to create an empty table from an existing table 
Sql :: psql client write to bash variable 
Sql :: oracle sql create view 
Sql :: install mysql 8 linux 
Sql :: create a unqie constraint mysql 
Sql :: this week mysql 
Sql :: sql show tables 
Sql :: not operator in oracle 
Sql :: mysql config user password 
Sql :: alter table add column and foreign key mysql 
Sql :: oracle undo usage by session 
Sql :: scaffold mysql database 
Sql :: oracle tables with column name 
Sql :: sql where keyword contains 
Sql :: drop multiple databases mysql 
Sql :: mysql timestamp to date 
Sql :: SQL Server Get the current identity value of the table 
Sql :: sql DATE = GETDATE() 
Sql :: mysql change auto_increment start value 
Sql :: postgres datetime now 
Sql :: sql count distinct group by 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =