???
select * from tb where condi2 select * from tb where condi=condi1

解决方案 »

  1.   

    取第5个:
    declare cursor_insert scroll cursor for select * from 你的表
    open cursor_insert
    fetch ABSOLUTE 5 from cursor_insert
    close cursor_insert
    deallocate cursor_insert
      

  2.   

    select top 1 * from (你的查询结果)temp
      

  3.   

    如果有主键 如下表
    create table T1
    (id int primary key,
     name char(10))---查找第n 条
    select top 1 * from t1 where id in ( select top n-1 id from t1)如果没有主键 如下表
    create table T1
    (id int , name char(10))---查找第n 条
    select identity(int,1,1) as id ,* into #tt from t1
    select * from #tt where id =n