Why do I get a warning when I run this code?
CREATE OR REPLACE PROCEDURE EnvoyDropTable (envoy_table_name in varchar2)
AS
v_rows NUMBER;
BEGIN
select count(*) into v_rows
from all_tables
where table_name = envoy_table_name AND owner = 'ENVOY';
if v_rows <> 0 then
drop table envoy_table_name;
end if;
END EnvoyDropTable;
/
The warning is this .....
Warning: Procedure created with compilation errors.
Also
Is there a better way to do what I am doing in the procedure? i.e. Checking to see if a table exists before I drop it?
Thanks
John
CREATE OR REPLACE PROCEDURE EnvoyDropTable (envoy_table_name in varchar2)
AS
v_rows NUMBER;
BEGIN
select count(*) into v_rows
from all_tables
where table_name = envoy_table_name AND owner = 'ENVOY';
if v_rows <> 0 then
drop table envoy_table_name;
end if;
END EnvoyDropTable;
/
The warning is this .....
Warning: Procedure created with compilation errors.
Also
Is there a better way to do what I am doing in the procedure? i.e. Checking to see if a table exists before I drop it?
Thanks
John