All Products
Search
Document Center

PolarDB:DROP PARTITION

Last Updated:Mar 28, 2026

Removes one or more partitions and all data stored in them from a partitioned table.

Syntax

ALTER TABLE table_name DROP PARTITION partition_names;
This statement cannot drop individual subpartitions, or drop HASH or KEY partitions.

Parameters

ParameterDescription
table_nameThe name of the partitioned table. Optionally schema-qualified.
partition_namesThe name of the partition to drop.

Example

Drop the p_2014 partition from the sales_range_range table:

ALTER TABLE sales_range_range DROP PARTITION p_2014;

Limitations

LimitationDetails
SubpartitionsCannot drop an individual subpartition. Dropping the parent partition removes all its subpartitions.
HASH partitionsCannot drop a HASH partition using this statement.
KEY partitionsCannot drop a KEY partition using this statement.