对于数据库中已经存在的数据,根据查询条件,将sort字段按照查询序号排序。

SELECT @t:=0;
update
organization_info
set  sort=(@t:=@t+1)
where org_area_code=#{orgAreaCode} and  is_valid=1  ORDER BY sort

相关文章:

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