TRUNCATE TABLE keyword

TRUNCATE TABLE permanently deletes the contents of a table without deleting the table itself.

Syntax#

Flow chart showing the syntax of the TRUNCATE TABLE keyword

Notes#

This command irremediably deletes the data in the target table. In doubt, make sure you have created backups of your data.

Examples#

TRUNCATE TABLE ratings;

See also#

To delete both the data and the table structure, use DROP.


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