如何截断所有用户表?
如何截断oracle中的所有用户表?我的表约束有问题。
How can I truncate all user table in oracle? I have problem with tables constraints.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何截断oracle中的所有用户表?我的表约束有问题。
How can I truncate all user table in oracle? I have problem with tables constraints.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
改进了上述脚本,以防由于存在依赖项(以依赖于此约束的外键形式 - ORA-02297)而无法删除约束,并打印所有(禁用、截断和启用)语句。
Improved the above script in case you can't remove the constraint because dependencies exist (in the form of foreign keys that are dependent on this constraint - ORA-02297.) and by printing all (disable, truncate and enable) statements.
不需要变量
问候
K
No need for variables
Regards
K
如果您有特殊限制导致上述脚本失败,请进行改进:
Improvement in case you have special constraints which make above script fail:
你可以输出,然后执行你喜欢的:
You can output, then execute the one you like: