Why doesn't Oracle tell you WHICH table or view does not exist?

前端 未结 8 1204
时光取名叫无心
时光取名叫无心 2021-01-31 13:43

If you\'ve used Oracle, you\'ve probably gotten the helpful message \"ORA-00942: Table or view does not exist\". Is there a legitimate technical reason the message doesn\'t incl

8条回答
  •  故里飘歌
    2021-01-31 14:21

    @Matthew

    Your query's a start, but it might not work when you have multiple schemas. For example, if I log into our instance as myself, I have read access to all our tables. But if I don't qualify the table name with the schema I'll get an ORA-00942 for tables without synonyms:

    SQL> select * from tools; 
    select * from tools 
                  * 
    ERROR at line 1: 
    ORA-00942: table or view does not exist 
    

    The table still shows up in all_tables though:

    SQL> select owner, table_name from all_tables where table_name = 'TOOLS'; 
    
    OWNER                          TABLE_NAME 
    ------------------------------ ------------------------------ 
    APPLICATION                    TOOLS 
    

    @erikson Sorry that doesn't help much. I'm with Mark - I used TOAD.

提交回复
热议问题