描述

该语句用于删除放在回收站的数据库。

格式

  1. PURGE DATABASE object_name;

参数解释

参数

描述

object_name

对象进入回收站后的新名字

示例

  • 删除放在回收站的数据库 __recycle_$_1_1597384386029184。
  1. OceanBase(admin@test)> create database db1;
  2. Query OK, 1 row affected (0.03 sec)
  3. OceanBase(admin@test)> drop database db1;
  4. Query OK, 0 rows affected (0.04 sec)
  5. OceanBase(admin@test)> show recyclebin;
  6. +--------------------------------+---------------+----------+----------------------------+
  7. | OBJECT_NAME | ORIGINAL_NAME | TYPE | CREATETIME |
  8. +--------------------------------+---------------+----------+----------------------------+
  9. | __recycle_$_1_1597384386029184 | db1 | DATABASE | 2020-08-14 13:53:06.029367 |
  10. +--------------------------------+---------------+----------+----------------------------+
  11. 1 row in set (0.01 sec)
  12. OceanBase(admin@test)> purge database __recycle_$_1_1597384386029184;
  13. Query OK, 0 rows affected (0.03 sec)
  14. OceanBase(admin@test)> show recyclebin;