tencent cloud

TDSQL Boundless

FLASHBACK TABLE

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2026-02-10 11:27:06

Description

Recover the table in the specified way. If another table shares the same name, an error will be reported.

Permission Requirements

You should have the Drop permission for this table.

Syntax

FLASHBACK TABLE recycle_table_name TO BEFORE DROP [RENAME TO new_table_name];

Parameter Description

Parameter
Required
Description
recycle_table_name
Required
Alias of the table after it enters the recycle bin. The alias can be obtained through the recycle_table field in SHOW RECYCLEBIN.
new_table_name
Optional
New name of the table when it recovers.

Examples

TDSQL [(none)]> show recyclebin;
+-----------+---------------+--------------+--------------------------------+---------------------+---------------------+
| tindex_id | origin_schema | origin_table | recycle_table | drop_time | purge_time |
+-----------+---------------+--------------+--------------------------------+---------------------+---------------------+
| 10028 | test | test2 | bin$/usodaiwngrpdoel2wnlqg==$1 | 2025-01-21 19:12:10 | 2025-01-28 19:12:10 |
+-----------+---------------+--------------+--------------------------------+---------------------+---------------------+

TDSQL [(none)]> flashback table `bin$/usodaiwngrpdoel2wnlqg==$1` to before drop rename to test.test3;
Query OK, 0 rows affected (1.72 sec)

TDSQL [(none)]> show tables;
+----------------+
| Tables_in_test |
+----------------+
| test1 |
| test3 |
+----------------+
2 rows in set (0.01 sec)


Ajuda e Suporte

Esta página foi útil?

comentários