ALTER TABLE...RENAME PARTITION v13
Use the ALTER TABLE… RENAME PARTITION
command to rename a table partition. The syntax takes two forms.
The first form renames a partition:
ALTER TABLE <table_name> RENAME PARTITION <partition_name> TO <new_name>;
The second form renames a subpartition:
ALTER TABLE <table_name> RENAME SUBPARTITION <subpartition_name> TO <new_name>;
Description
The ALTER TABLE… RENAME 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 TABLE… RENAME PARTITION
or ALTER TABLE… RENAME SUBPARTITION
.
Parameters
table_name
The name (optionally schema-qualified) of the table in which the partition or subpartition resides.
partition_name
The name of the partition to be renamed.
subpartition_name
The name of the subpartition to be renamed.
new_name
The new name of the partition or subpartition.
example_renaming_a_partition