select identity(1,1) as 列行,字段a into #temp from tablenameselect * from #tempdrop table #temp

解决方案 »

  1.   

    最好不要在sql中直接处理,因为sql中的实现会严重影响速度,建议拿到你的前台程序中处理,一般的数据感知控建都有这个功能,而却速度很快。
      

  2.   

    最好不要在sql中直接处理,因为sql中的实现会严重影响速度,建议拿到你的前台程序中处理,一般的数据感知控建都有这个功能,而却速度很快。