declare
cou_num number;
begin
select count(tname) into cou_num from tab where tname =upper('表名');
if (cou_num>0) then
dbms_output.put_line('该表存在');
end if;
end;
cou_num number;
begin
select count(tname) into cou_num from tab where tname =upper('表名');
if (cou_num>0) then
dbms_output.put_line('该表存在');
end if;
end;