DECLARE @PAGES INT,@NO INT
set @pages=20
set @no=2
--@PAGES 行数,@NO 第几页
select top @PAGES * from 表名 where (其他条件)
and id NOT in (select top @NO*20 id from 表名 where (其他条件) )
20-40
select * from 表名 where (其他条件) and id in (select top 20 id from 表名 where id not in (select top 20 id from 表名))
40-60
select * from 表名 where (其他条件) and id in (select top 20 id from 表名 where id not in (select top 40 id from 表名))