set @r:=0; update test set a=(@r:=@r+1)
效果图
求大神解!
https://blog.csdn.net/weixin_46040901/article/details/121744473问题已经解决
哪要啥mybatis,直接一个sql就能搞定了,