日期:2014-05-20 浏览次数:20716 次
select * from t_student,t_score,t_course where score<60 and coursename='科目一'
select * from t_student stu
left outer join t_score sco on sco.studentid=stu.id and sco.score<60
left outer join t_course?cou on sco.courseid = cou.id and cou.coursename='科目1'
select * from t_student where id in
(select id from t_score where score<60 and courseid in
(select id from t_course where coursename='科目1'))
select * from t_student where id in
(select id from t_score where score<60 and courseid in
(select courseid from t_course where coursename='科目1'))