mysql drop purge_droptablepurge

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 string

db_recycle_cache_size big integer 0

recyclebin 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:58

SQL> flashback table zml to before drop;

闪回完成。

SQL> select * from zml;

ID

----------

1

SQL>

-----------------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>

f68f2add0b68e4f9810432fce46917b7.png

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值