TRUNCATE partitions

If you wish to keep PARTITION DEFINITION in the table and remove only the data, you can execute the TRUNCATE PARTITION command:

mysql> ALTER TABLE event_history TRUNCATE PARTITION p20171001;Query OK, 0 rows affected (0.08 sec)

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.