0
當我試圖創建非主鍵列的表分區它得到一個錯誤:分區在SQL Server非主鍵列的表
CREATE PARTITION FUNCTION PartitionFuncByCntry (int) AS RANGE RIGHT
FOR VALUES ('10','11','12','15');
CREATE PARTITION SCHEME PartitionSchemeByCntry AS PARTITION
PartitionFuncByCntry TO
([PRIMARY],[PRIMARY],[PRIMARY],[PRIMARY],[PRIMARY]);
CREATE TABLE tblPartitionByCntry(memberId int PRIMARY KEY
identity(1,1), cntryId int, txt1 varchar(100), txt2 varchar(100), txt3
varchar(100), txt4 varchar(100)) ON PartitionSchemeByCntry(cntryId);
Msg 1908, Level 16, State 1, Line 16 Column 'cntryId' is partitioning column of the index 'PK__tblPartitionByCn__0880433F'. Partition columns for a unique index must be a subset of the index key. Msg 1750, Level 16, State 0, Line 16 Could not create constraint. See previous errors.
如何使分區非主鍵?