select  a.test,b.* from (select @y:=@y+1 as test,a.* from (select * from resourcecenter.cm_identify_relation a  group by a.issue_party   ) a,(select @y:=0) d order by issue_party) a,
resourcecenter.cm_identify_relation b 
where a.issue_party=b.issue_party order by b.issue_party


先在表中创建 字段a 的分组排序 并自增序号,
然后使用原来的表 进行根据字段a赋值,并显示加的序号列

相关文章:

  • 2021-09-27
  • 2022-03-09
  • 2021-08-24
  • 2021-04-23
  • 2021-01-09
  • 2022-12-23
  • 2021-09-27
猜你喜欢
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
相关资源
相似解决方案