• 2022-10-26
    在学生选课数据库中,检索被全部学生所选修的课程的SQL可以描述为( )
    A: SELECT Cno FROM SC WHERE (Select Count(Sno) FROM SC GROUP BY Cno) = (SELECT Count(*) FROM Student) ;
    B: SELECT Cno FROM SC x WHERE NOT EXISTS (SELECT * FROM Student s WHERE NOT EXISTS (SELECT * FROM SC y WHERE x.Cno = y.Cno AND s.Sno= y.Sno);
    C: SELECT Cno FROM SC x WHERE NOT EXISTS (( SELECT Sno FROM Student) EXCEPT ( SELECT y.Sno FROM SC y, Student z WHERE x.Cno=y.Cno AND z.Sno=y.Sno));
    D: 以上答案都不对
  • 举一反三