Skip to main content

DROP TABLE

Dropping a table deletes all of the data in the table as well as the table definition, thus we must exercise extreme caution while doing this operation. The DROP TABLE statement is used to delete a table, and only the table's owner has the authorization to perform this operation. Table deletion is supported in tables that utilize both the standard engine and the full_text engine.

Access Control

You must be the owner of the table being operated on in order to do this operation.

SQL Example

DROP TABLE bookshop.book;

Using SDK

Python SDK provides the drop_table() method to delete tables.

db = client.db(mk)
db.drop_table('bookshop', 'book')