Error: ORA-04043: object table name does not exist when describing any table within a specific user workstation from the SQL command line

痞子三分冷 提交于 2019-12-11 13:49:02

问题


I have created tables in Oracle DB from the SQL command line, and I'm having a problem when describing the table, when going through the oracle application express web page I can see them there.

The oracle version I have is the following: SQL*Plus: Release 11.2.0.2.0 Production

The following is the command I used to create a table in the database:

CREATE TABLE  "Product" 
(   "ProuctID" VARCHAR2(8) NOT NULL ENABLE, 
    "ProductExpiryDate" DATE, 
    "CustomerID" VARCHAR2(8), 
     CONSTRAINT "Product_PK" PRIMARY KEY ("ProductID") ENABLE
) ;

Command for describing the table:

Desc Product;

But at the end after creating each table and describe it I get this: ORA-04043: object Product does not exist

Can anyone please tell me why I am I getting this, when I can see it in Oracle Xpress web page?


回答1:


By enclosing the table name in double quotes, you created the table with a case-sensitive name. To correctly specify the name, you now have to always enclose it in double quotes.

So instead of Desc Product, you need Desc "Product".

Because this is quite cumbersome and error-prone, it's usually best to avoid enclosing table and column names in double quotes in the first place. If possible, I'd recommend you either drop & recreate the table or rename it.



来源:https://stackoverflow.com/questions/35515173/error-ora-04043-object-table-name-does-not-exist-when-describing-any-table-wit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!