gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-05 09:21:00 29 4
gpt4 key购买 nike

我已经从 SQL 命令行在 Oracle DB 中创建了表,但在描述表时遇到了问题,在浏览 oracle application express 网页时我可以在那里看到它们。

我的oracle版本如下: SQL*Plus:11.2.0.2.0 版生产

下面是我用来在数据库中创建表的命令:

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

描述表的命令:

描述产品;

但最后在创建每个表并对其进行描述后我得到了这个:ORA-04043: 对象产品不存在

当我在 Oracle Xpress 网页中看到它时,谁能告诉我为什么我会收到它?

最佳答案

通过将表名括在双引号中,您创建的表名称区分大小写。要正确指定名称,您现在必须始终将其括在双引号中。

因此,您需要的不是Desc Product,而是Desc "Product"

因为这非常麻烦且容易出错,所以通常最好避免在一开始就用双引号将表名和列名括起来。如果可能,我建议您删除并重新创建表或重命名它。

关于sql - 错误 : ORA-04043: object table name does not exist when describing any table within a specific user workstation from the SQL command line,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35515173/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com