Change Data Partitions

The alter table alters data partitions.

You can use the alter table command to:
The general procedures for repartitioning a table are:
  1. If the partition key or type is to change during the repartition process, drop all indexes on the table.
  2. Use alter table to repartition the table.
  3. If the partition key or type changed during the repartition process, re-create the indexes on the table.

Change an Unpartitioned Table to a Partitioned Table

An example of an unpartitioned titles table changing to a table with three range partitions.

alter table titles partition by range (total_sales)
(smallsales values <= (500) on seg1,
mediumsales values <= (5000) on seg2,
bigsales values <= (25000) on seg3)