Think of using tmp table,the difference between the tmp table and you select table is that there is a new column with type int and identity in tmp table. 
examples:create table #tmp(id int identity,col1 varchar(20),col2 int,col3 bit,...)insert into #tmp(col1,col2,col3,...) select col1,col2,col3,... from [your table]select col1,col2,col3,... from #tmp where id between 10 and 20

解决方案 »

  1.   

    select * from a1 as A where 
     (select count(id) from a1 where id <= A.id) 
        between 10 and 20 order by idselect id from 
     (select top 11 * from 
     (select top 20 * from a1 order by id) as A
    order by A.id desc) as B order by B.id asc
      

  2.   

    select * from table1 as A where (select count(id) from table1 where id <= A.id) 
        between 10 and 20 order by id
      

  3.   

    select top 10 * from 
    (select top 20 * from yourtable order by yourfield ) as a 
    order by yourfield desc
      

  4.   

    查询N-M条记录。
    select IDENTITY(int,1,1) as iid,* into #temptable from yourtable
    select top M * from #temptable where iid>=NOR:select top M * from yourTable where id not in(select top N-1 id from table)
    ID为表具有唯一值的任何字段