Prince_ZaZa
Go big or go home

select s.* from student s
where s_id in(
select distinct s_id
from score sc 
inner join(
select c_id
from course c
inner join teacher t on c.t_id=t.t_id
where t_name='张三'
)t1
on sc.c_id=t1.c_id
)

distinct 表示不重复的

posted on 2022-05-09 14:50  Prince_ZaZa  阅读(38)  评论(0)    收藏  举报