-- 经验榜单 SELECT ROW_NUMBER() OVER (ORDER BY Experience DESC) AS ChartID, UserID INTO #tbChartsExperienceBefore FROM aTable(NOLOCK) ORDER BY Experience DESC
这样,ChartID, 就是自动增长的标识列,不可以更改的。