update players as p
set p.id = (
SELECT count(*) from (select id from players) as sub
where p.id > sub.id
)
或使用>=(如果要从1开始)
update players as p
set p.id = (
SELECT count(*) from (select id from players) as sub
where p.id > sub.id
)
或使用>=(如果要从1开始)
评论一下吧
取消回复 评论守则