题目
解答
-
第一问
解法一
select Sname, Sno from Student where Sno in( select Sno from SC,Course where SC.Cno=Course.Cno and Cname="数据库" and Score>=all(select Score from SC where Cname="数据库"))
解法二
select top 1 Sname, SC.Sno from Student,SC where Student.Sno = SC.Sno and Cno in (select Cno from Course where Cname='数据库') order by Score desc
-
第二问
select Sno, Sname from Student where Sno in( select Sno from SC group by Sno having count(*)>=3)