对于数据库中已经存在的数据,根据查询条件,将sort字段按照查询序号排序。
SELECT @t:=0; update organization_info set sort=(@t:=@t+1) where org_area_code=#{orgAreaCode} and is_valid=1 ORDER BY sort
对于数据库中已经存在的数据,根据查询条件,将sort字段按照查询序号排序。
SELECT @t:=0; update organization_info set sort=(@t:=@t+1) where org_area_code=#{orgAreaCode} and is_valid=1 ORDER BY sort
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。