學習目標:
sql
學習內容:
41.查詢沒有學全所有課程的同學的信息
select *from students where students.stunm not in (select score.stunm from score group by score.stunm having count(score.counm)= (select count(counm) from course))
42.查詢至少有一門課與學號為" 1001 "的同學所學相同的同學的信息
select * from students left join score on students.stunm=score.stunm where students.counm in (Select score.counm from score where score.stunm=‘1001’);
select * from students left join score on students.stunm=score.stunm where score.counm in (Select score.counm from score where score.stunm=‘1001’);
Select distinct students.* from students left join score on students.stunm=score.stunm where counm in (select counm from score where score.stunm =‘1001’)
Select distinct s.* from students s left join score sc on s.stunm=sc.stunm where counm in (select counm from score where stunm=‘1001’) and s.stunm != ‘1001’
學習時間:
1月-3月,每天一小時左右
學習產出:
一周一發