Rebuilding a Hash or Hash-Range Partitioned Table

Once a table with hash or hash-range partitioning is unpartitioned, it can only be repartitioned by range. Hash and hash-range partitioning on an existing table is not supported.

If you accidentally unpartitioned a hash or hash-range partitioned table, to rebuild the partitioning structure, do the following:

  1. Create a new table with a hash or hash-range partitioning.
  2. Export the data from the original table.
  3. Load the data into the new table.
  4. Drop the original table.
  5. (optional) Rename the new table to that of the old table.
Related tasks
Creating a Range Partition on an Existing Table
Creating a Range Subpartition to an Existing Hash-Range Partitioned Table
Deleting a Range Partition or Subpartition
Unpartitioning a Table
Merging Partitions
Splitting a Partition
Moving a Partition
Managing Column Storage in a Table Partition
Viewing or Modifying Table Partition Properties
Related reference
Table Partition Privilege Summary