select identity(int,1,1) as rownum ,* into #tmp from yourtable
select * from #tmp where rownum >=10 and rownum <20

解决方案 »

  1.   

    select identity(int,1,1) as num,* into #temp from tablename
    goselect * from #temp where num in (10,20)
      

  2.   

    做个广告先
    推荐:
    应一些读者及网友要求:《一道褒贬不一的 SQL 考试题》原文及原题 ...
    http://www.triaton.com.cn/cgi-bin/lb5k/topic.cgi?forum=4&topic=97&show=0涉及了此类相关问题!
      

  3.   

    为何我的SQL SERVER提示说不支持IDENTITY