Teradata Database Message 5712 - 5712 - Analytics Database - Teradata Vantage

Teradata® VantageCloud Lake - Analytics Database Messages

Edition
Lake
Product
Analytics Database
Teradata Vantage
Published
October 2022
Language
English (United States)
Last Update
2024-02-26
dita:mapPath
tzr1629746512312.ditamap
dita:ditavalPath
ft:empty
dita:id
vza1585613049811
lifecycle
latest
Product Category
Teradata® Vantage™
Message
UNIQUE is not allowed.
Explanation
For a CREATE TABLE statement, a row partitioned primary index is not allowed to be unique unless all the partitioning columns are included in the set of primary index columns. For an ALTER TABLE statement, UNIQUE may only be specified if the primary index for the table is already unique, there is a unique secondary index on the same set of columns as the primary index, or the table is empty. In addition, a row partitioned primary index may only be specified as UNIQUE if all the partitioning columns are included in the set of primary index columns and altering the primary index columns of a unique primary index to not include all the partitioning columns is only allowed if NOT UNIQUE is specified. If the primary index is altered to be unique and there is a unique secondary index on the same set of columns as the primary index, the unique secondary index is dropped since it is no longer needed.
Generated By
RES modules.
For Whom
End User.
Notes
Use a unique secondary index to define the columns as unique if not all the partitioning columns are included in the set of primary index columns.
Remedy
Examine the SQL statement and verify that the request is correct. Change the statement to adhere to the partitioned primary index rules and resubmit the request.