H
hurryman
Unregistered / Unconfirmed
GUEST, unregistred user!
S(sno,sname,sex,age,dept,special);//系表
c(cno,cname,credit,dept,precno,tno);//课程
sc(sno,cno,grade);//成绩
//////////////////////////////////////
检索选修了计算机系全不课程的学生姓名,学号
select sno ,sname
from s,sc
where s.sno=sc.sno and s.sno in (
select sno
form sc
group by sno
having count(*)=count(
select distinct cno
from c
)
)
不知道对不对,大家检查一下
c(cno,cname,credit,dept,precno,tno);//课程
sc(sno,cno,grade);//成绩
//////////////////////////////////////
检索选修了计算机系全不课程的学生姓名,学号
select sno ,sname
from s,sc
where s.sno=sc.sno and s.sno in (
select sno
form sc
group by sno
having count(*)=count(
select distinct cno
from c
)
)
不知道对不对,大家检查一下