Purpose
This statement is used to drop a table in 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 dropped. |
| CASCADE CONSTRAINTS | Drops constraints associated with table_name in a cascading manner. |
| PURGE | Drops the table (without moving it to the recycle bin). |
Examples
Drop the tbl1 table.
obclient> DROP TABLE tbl1;
Query OK, 0 rows affected