注册 登录
编程论坛 SQL Server论坛

忙各位大神指点!!!关于查询的.......

IT男year 发布于 2013-10-13 10:10, 371 次点击
查询选修了跟王伟一样课程的学生姓名及成绩?
2 回复
#2
IT男year2013-10-13 11:01
select sn from s where
not exists(select * from (select cno from s,sc
where s.sno=sc.sno and sn='赵亦') x where
not exists(select * from sc where s.sno=sc.sno
and  )) and sn<>'赵亦'
#3
IT男year2013-10-13 11:02
select sn from s where
 not exists(select * from (select cno from s,sc
 where s.sno=sc.sno and sn='赵亦') x where
 not exists(select * from sc where s.sno=sc.sno
 and  )) and sn<>'赵亦'
1