v integer;
begin
select count(*) into v from tabs where table_name='your_table_name';
if v>0 then
dbms_output.putline('表存在!');
end if;
end;

解决方案 »

  1.   

    select * from user_objects 
         where object_name='T_PX_HZ_TEMP'
      

  2.   

    select * from user_objects 
     where object_type='TABLE' and object_name='MyTB_Name'
      

  3.   

    假如你的表为 public.employe_table
    connect internal/oracle;(本地服务器)
    set serveroutput on;
    declare
      ls_owner varchar(20);
    begin
      select owner into ls_owner
        from dba_tables
       where table_name = 'EMPLOYE_TABLE';-- 一定要大写
      if owner = 'PUBLIC' then 
        dbms_output.putline('表存在!');
      else
        dbms_output.putline('表存在!');
      end if ;
    end;
    /
      

  4.   

    sorry ,有点问题,现重写
    假如你的表为 public.employe_table
    connect internal/oracle;(本地服务器)
    set serveroutput on;
    declare
      ls_owner varchar(20);
    begin
      select owner into ls_owner
        from dba_tables
       where table_name = 'EMPLOYE_TABLE';-- 一定要大写
      if owner = 'PUBLIC' then 
        dbms_output.putline('表存在!');
      else
        dbms_output.putline('表不存在!');
      end if ;
    end;
    /
      

  5.   

    select count(*) into n from user_tables where table_name='YOUR_TABLE_NAME';
    if n=1 then
      y
    else
      n
    end if;
      

  6.   

    一句话。
    了解一下以下视图的内容,就会有收获。
    user_objects      dba_objects
    user_tables       dba_tables