DROP TABLE keyword

DROP TABLE permanently deletes a table and its contents. DROP ALL TABLES permanently deletes all the tables and their contents.


Backup your database to avoid unintended data loss.


Flow chart showing the syntax of the DROP TABLE keyword


An optional IF EXISTS clause may be added directly after the DROP TABLE keywords to indicate that the selected table should be dropped if it exists.


This command irremediably deletes the data in the target table. Unless the table was created in a different volume than the standard, see CREATE TABLE IN VOLUME, in which case the table is only logically removed and data remains intact in its volume. In doubt, make sure you have created backups of your data.

Disk space is reclaimed asynchronously after the table is dropped. Ongoing table reads might delay space reclamation.


DROP TABLE ratings;

See also#

To delete the data inside a table but keep the table and its structure, use TRUNCATE.

โญ Something missing? Page not helpful? Please suggest an edit on GitHub.