第六节 内联接查询、外联接查询
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
--内联接:Where select s.SName as姓名,m.Score 成绩from Students s,StuMark m where s.ID=m.StuID --三表联接查询 select s.SName 姓名,m.Score 成绩, c.CourseName 课程from Students s innerjoin stuMark m on s.ID=m.StuID innerjoin Courses c on c.ID=m.CourseID --左外联接(如果左表存在的数据在右表中不存在以空的方式显示) select s.SName,m.Score from Students s leftjoin StuMark m on s.ID=m.StuID --右外联接(如果右表存在的数据在左表中不存在以空的方式显示) select s.SName,m.Score from Students s rightjoin StuMark m on s.ID=m.StuID