SELECT stu.*
FROM student stu
JOIN sc s ON stu.sno = s.sno
WHERE s.cno IN (
SELECT cno
FROM course
WHERE course.tno = (
SELECT tno
FROM teacher
WHERE teacher.tname = '张三'
)
);
先查出上了张三老师的课的学生的编号。然后在用子链接查询学生的信息。