I am actually trying to partition a table.
while I am altering this table
ALTER TABLE ttaa ADD constraint PK_ttaa primary key clustered ( CODE, BRCODE, ttaa, IND, ttaa_NO, LINE_NO ) GO
I having this error .
Cannot create unique index 'PK_ttaa' on table 'PK_ttaa' as a local index. The table partition condition and the specified index keys make it impossible to enforce index uniqueness across partitions with a local index.
can anyone help me ?
To enforce uniqueness the partition keys must be a subset of the index keys, and must be in the same sequence.
Check the documentation for more detailed information: Adaptive Server Enterprise 15.5 > Transact-SQL Users Guide > Partitioning Tables and Indexes > Indexes and partitions