Purpose
This statement is used to delete a table from the database.
Privilege requirements
To execute the DROP TABLE statement, the current user must have the DROP system privilege. For more information about privileges in OceanBase Database, see Privilege classification in Oracle mode.
Syntax
DROP TABLE table_name [CASCADE CONSTRAINTS] [PURGE];
Parameters
| Parameter | Description |
|---|---|
| table_name | Specifies the name of the table to be deleted. |
| CASCADE CONSTRAINTS | Cascades the deletion to constraints associated with table_name. |
| PURGE | Permanently deletes the table (without moving it to the recycle bin). |
Examples
Delete the tbl1 table.
obclient> DROP TABLE tbl1;
Query OK, 0 rows affected