时间:2021-07-01 10:21:17 帮助过:5人阅读
select row_number() over (partition by 分组字段 order by 排序字段) as 序号,表现出的是组内连续不唯一的序号,
select * from (select row_number() over (order by 排序字段 desc) as rowid from table) as table where rowid between (@PageIndex-1)*@PageSize+1 and @PageIndex*@PageSize 分页查询,可用于中小数据排序,
sql 分组根据每组内部排序后的每组连续唯一的顺序编号
标签: