Teradata Database Message 5713 - 17.10 - 5713 - 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 secondary index is not allowed.
Explanation
For a CREATE TABLE statement, a unique secondary index on the same set of columns as the primary index columns must not be specified when the primary index is partitioned and the set of primary index columns includes all the partitioning columns. For an ALTER TABLE statement, a unique secondary index on the same set of columns as the primary index columns must not exist for the table when the resulting primary index is partitioned and the set of primary index columns includes all the partitioning columns and resulting primary index is not specified to be unique.
Generated By
RES modules.
For Whom
End User.
Notes
For a CREATE TABLE statement, the primary index should be created as UNIQUE instead of including a unique secondary index. For an ALTER TABLE statement, the altered primary index should be specified as UNIQUE (the ALTER TABLE statement automatically drops the unique secondary index). Alternatively, a unique secondary index may be created on the table in a separate CREATE INDEX statement after the CREATE TABLE or ALTER TABLE statement; this allows a table to be subsequently altered to have a unique primary index.
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.