All Products
Search
Document Center

PolarDB:Delete a partition

Last Updated:Apr 17, 2024

You can delete partitions from a partitioned table. This topic describes the syntax and provides examples.

Syntax

Delete a partition.

ALTER TABLE <table_name> DROP PARTITION <partition_name>;

Delete a subpartition.

ALTER TABLE <table_name> DROP SUBPARTITION <subpartition_name>;

Precautions

  • Deleting a partition will remove all its data.

  • When a partition is deleted, all its subpartitions are also deleted.