Dropping List Partitioning

Description

You can drop a partition by using the DROP PARTITION clause of the ALTER statement.

Syntax

ALTER {TABLE | CLASS} <table_name>
DROP PARTITION <partition_name>

Example

The following example shows how to create the athlete2 table partitioned by the list of sport events and drop the event3 partition.

CREATE TABLE athlete2( name VARCHAR(40), event VARCHAR(30) )

PARTITION BY LIST (event) (

PARTITION event1 VALUES IN ('Swimming', 'Athletics ' ),

PARTITION event2 VALUES IN ('Judo', 'Taekwondo','Boxing'),

PARTITION event3 VALUES IN ('Football', 'Basketball', 'Baseball')

);

 

ALTER TABLE athlete2 DROP PARTITION event3;