update 成绩表 set 分数 = 61
where 分数 in (select top 5 分数 from 成绩表 where 分数<60 order by 分数 desc)

解决方案 »

  1.   

    update t_score set score = 61 where score exists (select top 5 score from t_score where score<60 order by score desc)
      

  2.   

    从性能上:einsteincao(至尊宝) 更好一点
      

  3.   

    可能还是要按学号之类的主键更好一些。这样可以解决并列第5的问题。
    update 成绩表 set 分数 = 61
    where 学号 in (select top 5 学号 from 成绩表 where 分数<60 order by 分数 desc)
      

  4.   

    update 成绩表  set 分数 = 61
    where  (select count(1) from 成绩表 b where 
    b.分数<60 and b.分数>=成绩表.分数 )<=5
    and 分数<60
    并列情况