基于"学生-选课-课程"数据库中的三个关系:
S(S#,SNAME,SEX,BIRTHYEAR,DEPT),主码为S#
C(C#,CNAME,TEACHER),主码为C#
SC(S#,C#,GRADE),主码为(S#,C#)
查找"选修了至少5门课程的学生的学号",正确的SQL语句是
- A.SELECT S# FROM SC GROUP BY S# HAVING COUNT(*)≥ 5
- B.SELECT S# FROM SC GROUP BY S# WHERE COUNT(*)≥ 5
- C.SELECT S# FROM SC HAVING COUNT(*)≥ 5
- D.SELECT S# FROM SC WHERE COUNT(*)≥ 5
热度🔥347
解析:打开微信小程序查看本题解析