删除名为“用户”的数据库来自甲骨文

发布于 2024-09-30 13:01:42 字数 308 浏览 0 评论 0原文

好吧,这就是发生的事情...

我的一所大学运行了一个脚本,该脚本创建了一些表,其中包括一个 Oracle XE 10g 上名为“User”的表。现在我们无法删除该表,每次运行时都会得到 ORA-00903

DROP TABLE USER CASCADE CONSTRAINTS

当我们尝试对其运行任何更改查询时,也会发生同样的情况(这意味着重命名不起作用)

有人知道如何处理这个问题吗?

Ok this is what happend...

One of my colleges run a script that created some tables which included one table called "User" on an Oracle XE 10g. Now we are unable to drop that table, we get an ORA-00903 every time we run a:

DROP TABLE USER CASCADE CONSTRAINTS

The same happens when ever we try to run any alter query on it (that means renaming doesn't work)

Do someone know how to deal with this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情泪▽动烟 2024-10-07 13:01:42

您是否尝试过用引号完全限定:

drop table "myschema"."user"

have you tried fully qualifying with quotes:

drop table "myschema"."user"
愛上了 2024-10-07 13:01:42

兰迪建议引用标识符是正确的。但请注意,引用的标识符区分大小写

首先,查询 ALL_TABLES 或 USER_TABLES 以查找该表的区分大小写的名称,并在语句中使用该名称,例如

DROP TABLE "User";

ALTER TABLE "User" RENAME TO TBL_USERS;

Randy is right suggesting quoted identifiers. Note however that quoted identifiers are case-sensitive.

First, query ALL_TABLES or USER_TABLES to find the case-sensitive name of that table, and use that name in a statement such as

DROP TABLE "User";

or

ALTER TABLE "User" RENAME TO TBL_USERS;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文