SQL中为表添加排序序号 SELECT identity(INT, 1, 1) AS Rank,hotelNo,hotelName INTO #tmp FROM hotelSELECT * FROM #tmpDROP TABLE #tmp