• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

droptablepurge

mysql 搞代码 4年前 (2022-01-09) 26次浏览 已收录 0个评论

Oracle官方文档:Oracle Database SQL Language Reference PURGE Specify PURGE if you want to drop the table and release the space associated with it in a single step. If you specify PURGE, then the database does not place the table and its de

Oracle官方文档:Oracle Database SQL Language Reference

PURGE

Specify PURGE if you want to drop the table and release the space associated with it in a single step. If you specify PURGE, then the database does not place the table and its dependent objects into the recycle bin.

Caution:

You cannot roll back a DROP TABLE statement with the PURGE clause, nor can you recover the table if you have dropped it with the PURGE clause.

Using this clause is equivalent to first dropping the table and then purging it from the recycle bin. This clause lets you save one step in the process. It also provides enhanced security if you want to prevent sensitive material from appearing in the recycle bin.

————————————-

1、drop table zml后,zml表被放入recycle bin.可以通过flashback table zml to before drop恢复drop掉的表,表中数据也可以被恢复。

2、drop table zml purge后zml表被直接删除,不可恢复

--------实例:----------
---------------drop table zml-------------------------SQL> show parameter recycle;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------buffer_pool_recycle                  stringdb_recycle_cache_size                big integer 0recyclebin                           string      on---SQL> purge recyclebin;回收站已清空。SQL> show recyclebin;SQL> create table zml(id int);表已创建。SQL> insert into zml values(1);已创建 1 行。SQL> drop table zml;表已删除。SQL> show recyclebin;ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME---------------- ------------------------------ ------------ -------------------ZML              BIN$2cOZCZj0Ry27btpd7ymTHg==$0 TABLE        2014-04-23:21:56:58SQL> flashback table zml to before drop;闪回完成。SQL> select * from zml;        ID----------         1SQL>------------<span>本文来源gaodai#ma#com搞*!代#%^码网5</span>-----drop table zml1 purge-------------------------SQL> show recyclebin;SQL> create table zml1(id int);表已创建。SQL> insert into zml1 values(2);已创建 1 行。SQL> drop table zml1 purge;表已删除。SQL> show recyclebin;SQL>

搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:droptablepurge
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址