select sid,sname
from Student
where sid in(
select a.sid from SC a,SC b
where a.sid=b.sid and a.cid='001' and b.cid='002'
);
Student表:
sc表:
Teacher表:
Course表:
select sid,sname
from Student
where sid in(
select a.sid from SC a,SC b
where a.sid=b.sid and a.cid='001' and b.cid='002'
);
Student表:
sc表:
Teacher表:
Course表: