sql 分组后查询出排序字段
select row_number() over(partition by CODE order by SEQUENCE) as RowIndex from Table
注:根据表的CODE 字段分组,组内根据SEQUENCE字段排序,生成序号 RowIndex
select row_number() over(partition by CODE order by SEQUENCE) as RowIndex from Table
注:根据表的CODE 字段分组,组内根据SEQUENCE字段排序,生成序号 RowIndex