如何用SQL查询“假若统一学生不同课程的成绩相同,查询该学生的学号、所选课程的课
来源:百度知道 编辑:UC知道 时间:2024/05/26 21:42:18
是同一学生不同课程的成绩相同吧,可以使用自连接实现:
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
汗 lz山大的 还是管院的