怎样检测oracle中是否存在某个表?

解决方案 »

  1.   

    oracle没用过,不过给你个我用access时的判断表是否存在的函数.
    function Tmain.table_exists(tablename: string): boolean;
    var mytables: tstringlist;
    begin
      mytables := tstringlist.Create;
      ADOConnection1.GetTableNames(mytables);
      if (mytables.IndexOf(tablename) <> -1) then
        Result := true
      else
        Result := false;
    end;仅供参考.
      

  2.   

    select tname from tab where tname ='TABLENAME'记得表名一点要大写,因为ORACLE是区分大小写的,所有的表名都存放在tab表中.
      

  3.   

    to gyj_china(透明)
    select tname from tab where tname ='TABLENAME'
    是在delphi 中写的语句吗?
      

  4.   

    select table_name   from user_tables where table_name='用户表'
      

  5.   

    下面是我在oracle数据库中实验通过的,是查看数据库所有者的,用system/manager系统用户登陆oracle,然后
       select creator from syscatalog where tname='表名';
     只要表存在就有查询结果.