RT
我是10g  DBA的用户执行:
select   object_name,object_type;
select   *   from   all_objects;
都是有结果的,然后我想查询一些限定类型,看了一下表,是存在object_type = 'TABLE '和object_name=  'DBMS_STATS '的,但是我执行下面的语句之后就没有结果了,为什么呢?select   object_name,object_type   from   user_objects   where   object_type = 'TABLE ';
select   *   from   all_objects   where   object_name   =   'DBMS_STATS ';

解决方案 »

  1.   

    看看是不是条件中字符串空格、大小写的问题,用like试试呢
      

  2.   

    [code=SQ]L
    select object_name,object_type from user_objects where object_type = 'TABLE';--不是'TABLE '
    select * from all_objects where object_name = 'DBMS_STATS';--不是'DBMS_STATS '
    [/code]
      

  3.   

    select object_name,object_type from user_objects where object_type = 'TABLE';
    select * from all_objects where object_name = 'DBMS_STATS';
    最后都多了个空格符号
      

  4.   

       Are there any problems still? 
       Well,I have read the responses above,they wanted to tell you that you should not involve space in the single quotation. 
       And, in my option, if you still have problem with it ,the reason may be that you didn't use upper-case in the single quotation. It should be upper-case since it will strictly search for the charactors involved in quotation.
       I am a newer ,also need to develop myself, please adopt my advice if you think it can resolve your puzzle.