Friday, February 17, 2012

Rozenshtein question 7(sql cookbook)

any student taking 2 particular courses - a simpler approach IMHO

select * from student s
where exists
(select * from take t
where  t.sno = s.sno and t.cno = 'CS112')
and exists
(select * from take t
where  t.sno = s.sno and t.cno = 'CS114')

No comments:

Post a Comment