Adding or Dropping PRIMARY KEY and UNIQUE Constraints
ALTER TABLE … ADD UNIQUE/PRIMARY KEY requires the following privileges.
The following rules apply to adding and dropping PRIMARY KEY and UNIQUE constraints.
There are no exceptions to this rule.
The added primary key always maps to a unique secondary index (USI).
When you do this, Teradata Database creates a USI on the specified column set, and the system can then use the index to validate that the primary index columns are unique. You should only use this alteration as a temporary solution for making a NUPI unique. When you alter a table in this way, Teradata Database returns a warning message, and the CREATE TABLE SQL text returned by a SHOW TABLE request is not valid.
You should immediately alter the table using the MODIFY PRIMARY INDEX clause to change its primary index from a NUPI to a UPI. This action causes Teradata Database to drop the USI that had been defined on the old NUPI because it is no longer needed to enforce the uniqueness of the primary index.