50个查询系列-第8个查询:查询课程编号“002”的成绩比课程编号“001”课程低的所有同学的学号、姓名;


做法:

select tblstudent.StuId,tblstudent.StuName from tblstudent where
(
(select tblscore.Score from tblscore where tblstudent.StuId=tblscore.StuId and tblscore.CourseId='002')
<(select tblscore.Score from tblscore where tblstudent.StuId=tblscore.StuId and tblscore.CourseId='001')
)

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM