全部产品

PURGE DATABASE

描述

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

格式

 PURGE DATABASE object_name;

参数解释

参数

描述

object_name

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

示例

  • 删除放在回收站的数据库 __recycle_$_1_1597384386029184。
OceanBase(admin@test)> create database db1;
Query OK, 1 row affected (0.03 sec)

OceanBase(admin@test)> drop database db1;
Query OK, 0 rows affected (0.04 sec)

OceanBase(admin@test)> show recyclebin;
+--------------------------------+---------------+----------+----------------------------+
| OBJECT_NAME                    | ORIGINAL_NAME | TYPE     | CREATETIME                 |
+--------------------------------+---------------+----------+----------------------------+
| __recycle_$_1_1597384386029184 | db1           | DATABASE | 2020-08-14 13:53:06.029367 |
+--------------------------------+---------------+----------+----------------------------+
1 row in set (0.01 sec)

OceanBase(admin@test)> purge database __recycle_$_1_1597384386029184;
Query OK, 0 rows affected (0.03 sec)

OceanBase(admin@test)> show recyclebin;