第一种:为非聚集索引
create index Index_1 on BrandType (
Brand ASC,
Type ASC
)
go
第二种:为唯一索引
create unique index Index_1 on BrandType (
Brand ASC,
Type ASC
)
go
第三种:为聚集索引
create clustered index Index_1 on BrandType (
Brand ASC,
Type ASC
)
go
本文介绍了如何在SQL中创建三种不同类型的索引:非聚集索引、唯一索引和聚集索引。每种索引都有其特定的应用场景,通过示例展示了具体的创建语法。
第一种:为非聚集索引
create index Index_1 on BrandType (
Brand ASC,
Type ASC
)
go
第二种:为唯一索引
create unique index Index_1 on BrandType (
Brand ASC,
Type ASC
)
go
第三种:为聚集索引
create clustered index Index_1 on BrandType (
Brand ASC,
Type ASC
)
go
1432
812

被折叠的 条评论
为什么被折叠?