这里有四张表
Course
sc
student
teacher
用left join查询分数小于80的学生姓名、课程号及分数
SELECT st.Sname,s.`Cno`,s.score
FROM Student AS st
LEFT JOIN `sc` AS s
ON st.`Sno` = s.`Sno`
WHERE s.score < 80
在三张表中查询分数<80的学生的姓名、课程号、老师及分数 (这里用的是LEFT JOIN)
SELECT st.Sname,s.`Cno`,c.`Tna`,s.score
FROM Student AS st
LEFT JOIN `sc` AS s
ON st.`Sno` = s.`Sno`
LEFT JOIN `course` AS c
ON s.`Cno` = c.`Cno`
WHERE s.score < 80