14 May 2018        Add to Favorites   Report

Teradata : Alter table to change primary index to unique primary index

If the table already has a primary index and if it needs to be changed to UPI, for the same column combination,

  • First add a USI on the NUPI columns, then execute the below alter command

ALTER TABLE xxx MODIFY UNIQUE PRIMARY INDEX (NUPI_cols)


This will also drop the USI automatically

Copied