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

解决方案 »

  1.   

    我猜你是这个意思吧select identity(int ,1,1) rownum ,*  into #tmp from yourtableselect * from #tmp where rownum = 你想取的值
      

  2.   

    select top 1 * from yourTable where id not in(select top N-1 id from table)
    ID为表具有唯一值的任何字段试过不行。
    有什么办法不用零时表就能实现。
      

  3.   

    select top 1 * from yourTable where id not in(select top N-1 id from table)如果你表中有唯一性的字段,这样方法是可行的,
      

  4.   

    rs.open sql,conn,1,1
    ...
    rs.move N