> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# DROP TABLE

> DROP TABLE deletes a table from the database.

## 功能

该语句用于删除表。

## 语法

```sql theme={null}
DROP [TEMPORARY] TABLE [IF EXISTS] [db_name.]table_name [FORCE]
```

说明：

* 执行 DROP TABLE 后一段时间内（默认 1 天），可以通过 [RECOVER](/documents/cn/4.2/sql-reference/sql-statements/backup_restore/RECOVER.md) 语句恢复被删除的表。
* 如果执行 `DROP TABLE FORCE`，则系统不会检查该表是否存在未完成的事务，表将直接被删除并且不能被恢复，一般不建议执行此操作。
* 临时表删除后不可以通过 RECOVER 语句恢复。

## 示例

1. 删除一个 table。

   ```sql theme={null}
   DROP TABLE my_table;
   ```

2. 如果存在，删除指定 database 的 table。

   ```sql theme={null}
   DROP TABLE IF EXISTS example_db.my_table;
   ```

3. 强制删除表，并清理磁盘文件。

   ```sql theme={null}
   DROP TABLE my_table FORCE;
   ```

## References

* [CREATE TABLE](/documents/cn/4.2/sql-reference/sql-statements/table_bucket_part_index/CREATE_TABLE.md)
* [SHOW TABLES](/documents/cn/4.2/sql-reference/sql-statements/table_bucket_part_index/SHOW_TABLES.md)
* [SHOW CREATE TABLE](/documents/cn/4.2/sql-reference/sql-statements/table_bucket_part_index/SHOW_CREATE_TABLE.md)
* [ALTER TABLE](/documents/cn/4.2/sql-reference/sql-statements/table_bucket_part_index/ALTER_TABLE.md)
* [SHOW ALTER TABLE](/documents/cn/4.2/sql-reference/sql-statements/table_bucket_part_index/SHOW_ALTER.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.