在开始之前搭建演示环境: USE master GO SET NOCOUNT ON --创建表结构 IF OBJECT_ID(N'ClassA', N'U') IS NOT NULL DROP TABLE ClassA ), CreateDate DATETIME) CREATE INDEX IDX_CreateDate ON ClassA(CreateDate) GO --插入测试数据 DECLARE @ID INT BEGIN INSERT INTO ClassA VALUES(@ID, '