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
| Parameter | Description |
|---|---|
table_name | The name of the partitioned table. Optionally schema-qualified. |
partition_names | The 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
| Limitation | Details |
|---|---|
| Subpartitions | Cannot drop an individual subpartition. Dropping the parent partition removes all its subpartitions. |
| HASH partitions | Cannot drop a HASH partition using this statement. |
| KEY partitions | Cannot drop a KEY partition using this statement. |