Group By :分组,整个分组按Rowid一次排序
ROW_NUMBER() OVER(Group By Id ORDER BY DicId DESC) AS Rowid
PARTITION BY :分组,整个分组按照不同的ID重新依次排序
ROW_NUMBER() OVER(PARTITION BY Id ORDER BY DicId DESC) AS Rowid
排序结果分别如下:
Group By :分组,整个分组按Rowid一次排序
ROW_NUMBER() OVER(Group By Id ORDER BY DicId DESC) AS Rowid
PARTITION BY :分组,整个分组按照不同的ID重新依次排序
ROW_NUMBER() OVER(PARTITION BY Id ORDER BY DicId DESC) AS Rowid
排序结果分别如下: