What's wrong in this syntax? How should I make it work?

时间:2016-08-13 13:30:37

标签: mysql sql

select name , room 
from class 
where room="R128" 
   or name in (select cname 
               from enrolled 
               group by cname 
               having count(*)>=5;
            );

Also this query seems that it will take more time as it is finding out whether each of its name is present among any of the cname as mentioned. Can you do any better?

0 个答案:

没有答案