• 2022-06-09
    在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。查询至少选修了“201815005”同学所选课程的学生的姓名,可以使用如下SQL语句。select sname from student swhere sno[]‘201815005’ and not exists (select * from sc x where x.sno='201815005' and not exists (select * from sc y where y.cno=x.cno and y.sno=s.sno ) )
  • 举一反三