CREATE NONCLUSTERED INDEX index
ON table (column1)
INCLUDE (column2, column3) ON ????;
表被分区为3个文件组 我想创建物理存储在PRIMARY文件组中的索引 我该怎么办?
答案 0 :(得分:3)
您的语法是正确的 - 但是您只需要PRIMARY
与[]
一起逃脱,即:
CREATE NONCLUSTERED INDEX IX1
ON table (column1)
INCLUDE (column2, column3)
ON [PRIMARY];
如果您要移动现有索引,则需要drop the existing one:
CREATE NONCLUSTERED INDEX IX1
ON table (column1)
INCLUDE (column2, column3)
WITH (DROP_EXISTING = ON)
ON [PRIMARY];