Drop all partitions from a table MySQL

Cirrus86 :

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?

danblack :

ALTER TABLE table_name REMOVE PARTITIONING can achieve what you want.

test fiddle

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=14051&siteId=1