10.3.8 ALTER TABLE… RENAME PARTITION

Table of Contents Previous Next



Use the ALTER TABLE… RENAME PARTITION command to rename a table partition. The syntax takes two forms.
ALTER TABLE table_name
RENAME PARTITION partition_name
TO new_name;
ALTER TABLE table_name
RENAME SUBPARTITION subpartition_name
TO new_name;
The ALTER TABLERENAME PARTITION command renames a partition.
The same behavior as previously described applies for the subpartition_name used with the RENAME SUBPARTITION clause.
You must own the specified table to invoke ALTER TABLERENAME PARTITION or ALTER TABLE RENAME SUBPARTITION.
Query the ALL_TAB_PARTITIONS view to display the partition names:
The following command renames the americas partition to n_america:
ALTER TABLE sales
RENAME PARTITION americas TO n_america;
Querying the ALL_TAB_PARTITIONS view demonstrates that the partition has been successfully renamed:


Table of Contents Previous Next