SQL 练习37
- 检索至少选修两门课程的学生学号
SELECT Student.SId,Student.Sname,选课数 from Student,
(SELECT sid,COUNT(cid) 选课数 from sc GROUP BY sid HAVING COUNT(cid)>=2) t
WHERE Student.SId = t.sid
本文来自博客园,作者:弩哥++,转载请注明原文链接:https://www.cnblogs.com/bangbangzoutianya/p/15168054.html