问题
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