select SNo,CNo,sum(Score) Score from test.SC group by SNo,CNo;
或者
select * from test.SC order by SNo,CNo;
这种需求不适合用分组
想要分组显示,要么用聚合函数,要么就加上所有列,亲测成功执行
SELECT * FROM SC GROUP BY SNo,CNo,Score
select SNo,CNo,sum(Score) Score from test.SC group by SNo,CNo;