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

nVector

posted on 14 May 18

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds