Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 | 

Dropping Range Partitions

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>

  • table_name : Specifies the name of the partitioned table.
  • partition_name : Specifies the name of the partition to be dropped.
Example

The following is an example of dropping the before_2000 partition in the participant2 table.

ALTER TABLE participant2 DROP PARTITION before_2000;

Caution
  • When dropping a partitioned table, all stored data in the partition are also dropped.
  • If you want to change the partitioning of a table without losing data, use the ALTER TABLE...REORGANIZE PARTITION statement (see "Redefining Range Partitions").
  • The number of rows deleted is not returned when a partition is dropped. If you want to delete the data, but want to maintain the table and partitions, use the DELETE statement.