CREATE OR REPLACE PROCEDURE DeleteIfExists
AS
iexists Number;
BEGIN
select count(*) into iexists from user_tables where table_name = 'tmpFIXDCActns';
if
iexists := 1
then execute immediate 'drop table tmpFIXDCActns';
end if;
END;
I was told that the in ORACLE you cannot use DROP IF EXISTS and writting the above code is a way around this.
However the above proc compiles with errors. Can anyone tell me why that is?
Thank you in advance
AS
iexists Number;
BEGIN
select count(*) into iexists from user_tables where table_name = 'tmpFIXDCActns';
if
iexists := 1
then execute immediate 'drop table tmpFIXDCActns';
end if;
END;
I was told that the in ORACLE you cannot use DROP IF EXISTS and writting the above code is a way around this.
However the above proc compiles with errors. Can anyone tell me why that is?
Thank you in advance