All Products
Search
Document Center

PURGE TABLE

Last Updated: Jun 18, 2021

Description

You can execute the PURGE TABLE statement to delete a table from the recycle bin.

Syntax

 PURGE TABLE object_name;

Parameters

Parameter

Description

object_name

The name of the object in the recycle bin. After an object is moved to the recycle bin, the system renames the object.

Examples

  • Delete table __recycle_$_1_1099511628776_1099511677778 from the recycle bin.

OceanBase(admin@test)> create table test(c1 int);
Query OK, 0 rows affected (0.16 sec)

OceanBase(admin@test)> drop table test;
Query OK, 0 rows affected (0.03 sec)

OceanBase(admin@test)> show recyclebin;
+-------------------------------------------+---------------+-------+----------------------------+
| OBJECT_NAME                               | ORIGINAL_NAME | TYPE  | CREATETIME                 |
+-------------------------------------------+---------------+-------+----------------------------+
| __recycle_$_1_1099511628776_1099511677778 | test          | TABLE | 2017-10-20 17:40:22.304025 |
+-------------------------------------------+---------------+-------+----------------------------+
1 row in set (0.02 sec)

OceanBase(admin@test)> purge table __recycle_$_1_1099511628776_1099511677778;
Query OK, 0 rows affected (0.04 sec)