可以这样做:从数据表中取出第n条到第m条的记录方法:
其中id为表的关键字。
select top m-n+1 from table
where (id not in(select top (n-1) id from table))
本人已试过多次,很好用。如有不懂可mail给我一起交流。jacksomly@163.com
給個例子,呵呵,希望你能夠看明白
select * from
(select count(*) as rank, a.num,a.ch from test a,test b where a.num>=b.num
group by a.num,a.ch order by count(*) )
where rank>=1600 and rank<=1100