update tbl t1 set t1.score = (select score from tbl t2 where t2.class = t1.class and t2.rank = 1);--假设表名为tbl,score为分数,rank表示排名,class为班级