Check to see if table exists
Hello,
I want to check if a table exists, if yes then drop the table. Is there more elegant code to check if a table exist then the code below? Thanks.
declare
cnt number;
begin
select count(*) into cnt from user_tables
where table_name = 'MYTAB';
if cnt = 1 then
drop table MYTAB;
end if;
end;
/