哈,问题解决了:
SELECT * FROM student where exists( select id from studentfav where fav in ('movie', 'reading'))不知道这个解决方法对不对?

解决方案 »

  1.   

    修正:
    SELECT * FROM student where exists( select * from studentfav where fav in ('movie', 'reading'))
      

  2.   

    我觉得
    SELECT * FROM student where id in( select distinct id from studentfav where fav in ('movie', 'reading'))
      

  3.   

    SELECT * FROM student where exists( select * from studentfav where fav in ('movie', 'reading'))
    好像不对喔
    应该为select * from student where exists (select * from studentfav where student.id=id and fav in('movie', 'reading'))吧
      

  4.   

    你们上面所选择出来的,好像是:studentfav.fav in 'movie'OR 'reading'只要含有'movie'OR 'reading'其中的一项就会被选择出来了!可是题意好像是选择studentfav.fav in 'movie'and 'reading'个人认为应为:select * from student where id in(select id from studentfav s1,studentfav s2
    where s1.fav='movie' and s2.fav='reading');个人意见,接受批评!偶也是刚学SQL!