求教!SQL聚簇引索的删除与建立
SQL2008创建表,设置主键时系统默认在主键上创建聚簇引索。怎样,在不变更主键的情况下,删除这个默认的聚簇引索?我的目的是想在其它列上重新建立一个聚簇引索,小弟菜鸟,谢谢解答!
[解决办法]
for example,
create table dds
(c1 int not null,
c2 int not null
constraint pk_dds primary key nonclustered (c1)
)
create clustered index ix_dds_c2 on dds(c2)
sp_helpindex dds
/*
index_name index_description index_keys
------------------ ------------------------------------------------------ --------------
ix_dds_c2 clustered located on PRIMARY c2
pk_dds nonclustered, unique, primary key located on PRIMARY c1
*/