Deletes one or more tables from a PolarDB-X 1.0 database. The system automatically removes all associated physical tables.
Syntax
DROP [TEMPORARY] TABLE [IF EXISTS]
tbl_name [, tbl_name] ...
[RESTRICT | CASCADE]Note PolarDB-X 1.0 supports the same DROP TABLE syntax as MySQL. For the full syntax reference, see DROP TABLE statement.
Usage notes
- Dropping a table that has a global secondary index (GSI) deletes both the primary table and the index table.
- To delete only the index table, use ALTER TABLE DROP INDEX instead.
Example
Drop a table named user_log:
DROP TABLE user_log;