如何删除所有用户表?
如何删除oracle中的所有用户表?
我有限制问题。当我禁用所有它仍然是不可能的。
How can I drop all user tables in oracle?
I have problem with constraints. When I disable all it is still no possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
如果您只是想要一种非常简单的方法来执行此操作..这是我过去使用过的脚本
这将为架构中的所有表打印出一系列删除命令。假脱机该查询的结果并执行它。
来源:https://forums.oracle.com/forums/thread.jspa?threadID=614090
同样,如果您想清除的不仅仅是表格,您可以编辑以下内容以满足您的需求
If you just want a really simple way to do this.. Heres a script I have used in the past
This will print out a series of drop commands for all tables in the schema. Spool the result of this query and execute it.
Source: https://forums.oracle.com/forums/thread.jspa?threadID=614090
Likewise if you want to clear more than tables you can edit the following to suit your needs
对我有用的另一个答案是(归功于 http://snipt.net/Fotinakis/drop-all-tables-and-constraints-within-an-oracle-schema/)
请注意,它在运行后立即起作用。它确实不生成您需要粘贴到某处的脚本(就像此处的其他答案一样)。它直接在数据库上运行。
Another answer that worked for me is (credit to http://snipt.net/Fotinakis/drop-all-tables-and-constraints-within-an-oracle-schema/)
Note that this works immediately after you run it. It does NOT produce a script that you need to paste somewhere (like other answers here). It runs directly on the DB.
最简单的方法是使用cascade 命令删除拥有对象的用户。
The simplest way is to drop the user that owns the objects with the cascade command.
user_tables
是系统表,包含用户的所有表SELECT 子句将为每个表生成一个 DROP 语句
你可以运行脚本
user_tables
is a system table which contains all the tables of the userthe SELECT clause will generate a DROP statement for every table
you can run the script
最简单的方法是删除表空间,然后重新构建表空间。但我宁愿不必这样做。这与 Henry 的类似,只是我只是在 gui 中的结果集上进行复制/粘贴。
The easiest way would be to drop the tablespace then build the tablespace back up. But I'd rather not have to do that. This is similar to Henry's except that I just do a copy/paste on the resultset in my gui.
要删除 oracle 中的所有对象:
1) 动态
2) 静态
To remove all objects in oracle :
1) Dynamic
2)Static
请按照以下步骤操作。
Please follow the below steps.
您可以使用 DBeaver 数据库工具连接到您的数据库,然后选择所有表,然后右键单击并选择删除。
You may use DBeaver database tool to connect to your database and then select all tables and then right click and select Delete.