--------------------------表结构--------------------------
student(StuId,StuName,StuAge,StuSex) 学生表
teacher(TId,Tname) 教师表
course(CId,Cname,C_TId) 课程表
sc(SId,S_CId,Score) 成绩表
----------------------------------------------------------
问题五:查询没学过“叶平”老师课的同学的学号、姓名
SELECT StuId,StuName FROM student WHERE StuId NOT IN ( SELECT SId FROM sc JOIN course ON sc.S_CId=course.CId JOIN teacher ON course.C_TId=teacher.TId WHERE teacher.Tname="叶平" );
答案仅供参考,不一定完全正确,若发现错误或有更好的,欢迎评论,互相交流,一起成长!!!