Mysql 自增並賦值

UPDATE mdl_dz_user as u1 INNER JOIN (SELECT id,point,@i :=@i+1 as r  from mdl_dz_user INNER JOIN (SELECT @i:=0) b ORDER BY point desc) as u2 set u1.rank2=u2.r where u1.id = u2.id; spa 按照point 字段來排序 並給
相關文章
相關標籤/搜索