select * form a (select top 40 字段 from 表 where 条件 order by ) where 字段 Not in (select top 30 字段 from 表 where 条件 order by )

解决方案 »

  1.   

    上面有误!
    select * from a ((select top 40 字段 from 表 where 条件 order by ) as a )where 字段 Not in (select top 30 字段 from 表 where 条件 order by )
      

  2.   

    我想知道的就是原表格的数据并没有进行排序,那么用此方法查询出来的数据,是不是一定和原表格的排序方式一样。就是说无论哪一个我都不写order by,因为一旦查询出来的顺序和原来的不一样,就没有意义了。
      

  3.   

    select * from 表 as a where (select count(1) from 表  as b where a.字段<b.字段 )>=30 and (select count(1) from 表 as c where a.字段<c.字段)<=39
      

  4.   

    那么count(1),呢?我知道count(*)表示统计记录的总数,1是什么意思?
      

  5.   

    a.字段<b.字段什么意思?太绕嘴了。