Select identity(int,1,1) id,* into #tem from table1
select * from #tem where id=10--取第10行
drop table #tem

解决方案 »

  1.   

    取第10行。select * from t where id in(select top 11 id from t) and id not in (select top 10 id from t)
      

  2.   

    to  pbsql(风云):谢谢你的回复。不知有没有简单一点的办法呢?尤其是TABLE1返回的记录很多时,这几条语句岂不是很耗时?
      

  3.   

    select top 1 * 
    from 表
    where id not in (select top 9 id from 表)
      

  4.   

    select * from t where id in(select top 11 id from t order by id desc) and id not in (select top 10 id from t order by id desc)or select * from t where id=
    (select top 1 id from 
    (select top 10 id from t order by id) a order by id desc
    )
      

  5.   

    以上几个应该都行呀,不知性能方面哪个最佳呢?感觉是shuiniu(用泪水灌溉幸福) 的最好