尽管有可用的分区功能和方案,但如何在未分区的表上创建分区索引。这是我在某处读到的练习,不是真正的问题
create partition function func(datetime)
as range right for values
('20040601', '20050601')
go
create partition scheme scheme1
as partition func
to ('primary')
go
create table student
(
studentid int not null primary key nonclustered,
firstname varchar(30) not null,
date datetime not null
)
我在想
create clustered index IX_StudentID_Date
on student(studentid, date)
但是表没有分区,那么如何在不分区表的情况下创建索引呢?