select top 18 * 
from 表
where id not in (select top 12 id from 表)id 为自动增长列,或是主键!!!!

解决方案 »

  1.   

    select top 8 * from (select top 20 from table_name order by sort_field) A order by sort_field desc
      

  2.   

    select identity(int,1,1) as ID,* into #temp_table from table1
    select * from #temp_talbe
    where ID between 13 and 20
      

  3.   

    看错了 应该是top 8 !!
    select top 8 * 
    from 表
    where id not in (select top 12 id from 表)
      

  4.   

    select top 8 * from (select top 20 * from table_name order by sort_field) A order by sort_field desc
      

  5.   

    如果表中有主键(记录不重复的字段也可以),可以用类似下面的方法,当然x,y要换成具体的数字,不能用变量:select top y * from 表 where 主键 not in(select top (x-1)*y 主键 from 表)如果表中无主键,可以用临时表,加标识字段解决.这里的x,y可以用变量.select id=identity(int,1,1),*  into #tb from 表
    select * from #tb where id between (x-1)*y and x*y-1
      

  6.   

    其他方法参考我的贴子:--查询第X页,每页Y条记录
    http://expert.csdn.net/Expert/topic/2365/2365596.xml?temp=.9388086