--例子declare @t table(id int,a varchar(10))
insert into @t select 2,'3rw3313'
insert into @t select 1,'fer33113'
insert into @t select 4,'3rw3r133'
insert into @t select 3,'33e313'
insert into @t select 7,'rw3313'
insert into @t select 8,'33rw13'
insert into @t select 11,'3r3r3'--3-5行
select [id_t]=identity(int,1,1),* into # from @t
select id,a from (select top 3 * from (select top 5 * from # order by id_t)a order by id_t desc)b order by b.id_tselect id,a from # where id_t between 3 and 5drop table #