日期:2014-05-18 浏览次数:20538 次
SELECT A.* FROM 课程信息表 A WHERE EXISTS ( SELECT 1 FROM 定课表 B WHERE A.c_id = B.c_id AND B.c_id = '???' AND B.C_Style = '英语' GROUP BY c_id , b_id HAVING COUNT(1) < 4 )
------解决方案--------------------
select * from 课程信息表 where C_ID in( select C_ID from 定课表 group by 定课表 where C_ID='xx' having count(1)<4)