--创建聚集索引
create CLUSTERED INDEX 索引名称 ON 表名(字段名)
--创建非聚集索引
create NONCLUSTERED INDEX 索引名称 ON 表名(字段名)
--删除指定约束
alter table 表名
drop constraint 主键约束名称
--将指定字段设置成主键非聚集索引
alter table 表名
add constraint 主键约束名称 primary key NONCLUSTERED(字段名)
--创建表指定主键为非聚集索引,默认不写NONCLUSTERED为聚集索引
CREATE TABLE Test
(
ID INT PRIMARY KEY NONCLUSTERED --非聚集索引
)