1
update t1
set t1.score=86
from 表 t1 inner join 
(select top 7 * from 表 where 学号+科目 not in
(select top 6 学号+科目 from 表) )t2
on t1.学号=t2.学号 and t1.科目=t2.科目2.select top 6 * from 表 where 学号+科目 not in
(select top 5 学号+科目 from 表) 3.delete from 表 where 学号+科目 in
(select top 3 学号+科目 from 表)