mysqlsqlpartitionsql-drop

Drop all partitions from a table MySQL


How can I drop all partitions from a table in MySQL. I know you can drop specific partitions with ALTER TABLE table_name DROP PARTITION p0, p1, but is there a way to not list every single partition name?


Solution

  • ALTER TABLE table_name REMOVE PARTITIONING can achieve what you want.

    test fiddle