Mysql 不用外连接 用内连接 如何查询某些没有选课学生的信息

img

img

只想到用外连接 然后用判断null 来确定哪些 学生没有选课,想了解 不用外连接要怎么做 这个

--查询没有选课的学生
--方法一:
select t.sno,t.sname from student t where not exists
(select 1 from score t1 where t.sno=t1.sno);

--方法二:
select t.sno,t.sname from student t where t.sno not in
(select t1.sno from score t1 );

求不存在成绩的学生。可以用exists

img