ALTER TABLE (MODIFY Option)
Redefining the Primary Index or Partitioning for a Table
There are three ways to redefine the PRIMARY INDEX/NO PRIMARY INDEX and PARTITION BY/NOT PARTITIONED clauses for a table.
a Create a new table with the primary index and partitioning, if required, defined properly.
If the new table is to be column‑partitioned, create a new column‑partitioned table with no primary index.
b Copy the rows and, if desired, the statistics from the old table into the new table.
You can use ALTER TABLE to perform the following modifications to primary indexes and partitioning for a table.
If you alter a table to have a UPI and there is already a USI defined on the same column set, Teradata Database drops the USI automatically as part of the ALTER TABLE operation.
A primary index cannot contain any BLOB, CLOB, ARRAY, VARRAY, Period, or Geospatial columns.
You cannot change the primary index for an error table (see “CREATE ERROR TABLE” on page 228).