select identity(int,1,1) as NO,* into #t from table where .....order by ...select * from #t

解决方案 »

  1.   

    回复人: j9988(j9988) ( ) 信誉:323  2003-01-11 10:06:00  得分:0 
    select identity(int,1,1) as NO,* into #t from table where .....order by ...select * from #t
      

  2.   

    哈哈!楼上连j9988都拷贝下来了!select IDENTITY(int, 1,1) AS ID_Num,* into #temp from 表
    select * from #temp where ID_Num>10 and ID_Num<=20