1 --1.分组排序 2 SELECT *,ROW_NUMBER() OVER(PARTITION BY @fileName,@fileName1 ORDER BY ID DESC) AS rowNum FROM @tableName 3 4 --2.生成序列号 5 SELECT *,ROW_NUMBER() over(order by id ASC) AS rowNum FROM @tableName
翻译
搜索
复制
<iframe></iframe> 标签:tableName,NUMBER,Server,分组,Sql,序列号,排序,rowNum From: https://www.cnblogs.com/xy0710/p/17717249.html