select sid,sname from Student
where sid not in (
select sid from SC
where cid=(
select cid from Course
where tid=(
select tid from Teacher
where tname='张三'
)
)
);
Student表:
SC表:
Teacher表:
Course表: