sql中创建主键非聚集索引和聚集索引

来源:互联网 发布:华硕笔记本连不上网络 编辑:程序博客网 时间:2024/05/09 15:44

 -排序(聚集索引)
create clustered index inx_entry_stock_bi on entry_stock_d(entry_stock_bi)

--创建非聚集索引

create nonclustered index inx_entry_stock_on entry_stock_d(entry_stock_bi)

--主键
alter table entry_stock_d add primary key nonclustered--主键且非聚集
(
 entry_stock_bi,aid
)

原创粉丝点击