All Products
Search
Document Center

PolarDB:Command list for partitioned tables

Last Updated:Apr 01, 2026

PolarDB for Oracle supports Oracle-compatible DDL commands for creating and managing partitioned tables. The following table lists all supported commands, grouped by operation type.

Classification Command for partitioned tables Description
Creation CREATE TABLE... PARTITION BY Creates a partitioned table.
CREATE TABLE ... PARTITION BY HASH Creates a hash-partitioned table with a specified number of partitions.
Change ALTER TABLE...ADD PARTITION Adds a partition to an existing partitioned table.
ALTER TABLE ADD SUBPARTITION Adds a subpartition to an existing subpartitioned partition.
ALTER TABLE…EXCHANGE PARTITION Swaps an existing table with a partition or a subpartition.
ALTER TABLE MOVE PARTITION Moves a partition or a subpartition to a different tablespace.
ALTER TABLE RENAME PARTITION Renames a table partition.
ALTER TABLE SPLIT PARTITION Divides a partition into two partitions and redistributes the content of the partition between the new partitions.
ALTER TABLE…SPLIT SUBPARTITION Divides a subpartition into two subpartitions and redistributes the content of the subpartition between the new subpartitions.
ALTER TABLE…MERGE PARTITION Merges two partitions into a new partition that has the content of the original two partitions.
ALTER TABLE...MERGE SUBPARTITION Merges two subpartitions into a new subpartition that has the content of the two original subpartitions.
Deletion ALTER TABLE DROP PARTITION Deletes a partition structure and the data stored in the partition.
ALTER TABLE DROP SUBPARTITION Deletes a subpartition structure and the data stored in the subpartition.
ALTER TABLE TRUNCATE PARTITION Removes the data from a specified partition but leaves the partition structure intact.
ALTER TABLE TRUNCATE SUBPARTITION Removes all the data from a specified subpartition but leaves the subpartition structure intact.
DROP TABLE Deletes a schema and the data stored in the table.
TRUNCATE TABLE Removes all the data from a table and retains the schema.
Query Query a specified partition Queries a specified partition or subpartition.