Change the Partitioning Type or Key

Before changing the partition type or key, you must drop all indexes.

Change the Partition Type

This example repartitions titles by hash on the title_id column:
alter table titles partition by hash(title_id)
	3 on (seg1, seg2, seg3)	
Repartition titles again by range on the total_sales column.
alter table titles partition 
		by range (total_sales)
	(smallsales values <= (500) on seg1,
	mediumsales values <= (5000) on seg2,
	bigsales values <= (25000) on seg3)

Change the Partition Key

This example changes the partition key but not the partitioning type:

alter table titles partition by range(pubdate)
	(q1 values <= ("3/31/2006"),
	q2 values <= ("6/30/2006"),
	q3 values <= ("9/30/2006"),
	q1 values <= ("12/31/2006"))
Related concepts
Add Partitions to a Partitioned Table