如何用SQL查询“假若统一学生不同课程的成绩相同,查询该学生的学号、所选课程的课

如题所述

是同一学生不同课程的成绩相同吧,可以使用自连接实现:
select t1.xuehao,t1.kecheng,t1.chengji from tablename t1 join tablename t2 on t1.xuehao = t2.xuehao where t1.chengji=t2.chengji and t1.xuehao <> t2.xuehao
温馨提示:答案为网友推荐,仅供参考
第1个回答  2019-08-09
你好!

lz山大的
还是管院的
打字不易,采纳哦!
第2个回答  2009-11-10
汗 lz山大的 还是管院的
相似回答