Changing the partitioning type

The titles table was range-partitioned in “Adding partitions to a partitioned table”. 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)

NoteYou must drop all indexes before changing the partitioning type.