查询只被一名学生选修的课程的课程号、课程名;
select sc.cno,cname
from sc,course
where sc.cno=course.cno and sc.cno in
(select cno
from sc
group by cno
having count(sno)=1)
输出样例:
查询只被一名学生选修的课程的课程号、课程名;
select sc.cno,cname
from sc,course
where sc.cno=course.cno and sc.cno in
(select cno
from sc
group by cno
having count(sno)=1)
输出样例: