读书人

大家看看这个查询如何写

发布时间: 2012-05-24 11:55:41 作者: rapoo

大家看看这个查询怎么写?



查询“至少选修了学号为109的学生选修的全部课程的学生号”

[解决办法]

SQL code
select a.snofrom score ainner join (select cno from score where sno='109') bon a.cno=b.cno and a.sno<>'109'group by a.snohaving count(*)>=(select count(*) from (select cno from score where sno='109')) 

读书人网 >SQL Server

热点推荐