select s.*, c1.cno, c1.score, c2.cno, c2.score
from student s
join sc c1 on s.sno = c1.sno
join sc c2 on s.sno = c2.sno
where c1.cno = 1
and c2.cno = 2
and c1.score < c2.score;
总结
- 套路跟第一个题一样哈。
select s.*, c1.cno, c1.score, c2.cno, c2.score
from student s
join sc c1 on s.sno = c1.sno
join sc c2 on s.sno = c2.sno
where c1.cno = 1
and c2.cno = 2
and c1.score < c2.score;
总结
本文标题:【mysql经典题】2、查询"1"课程比"2"课程成绩低的学生的
本文链接:https://www.haomeiwen.com/subject/qsfhuktx.html
网友评论