Teradata Database Message 5712 - 17.10 - 5712 - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Database Messages

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1096-171K
Language
English (United States)
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.