1.内联接:使用(inner join) 2.外联接(左外联接):使用(left join或者left outer join),(右外联接):使用(right join或者right outer join) ,(完整外联接):使用(full join或者full outer join)
内联接查询:select Students.SName,Score.CourseID,Score.Score from Students.Score where Student.Score=Score.StudentID 或者 select s.SName,C.CourseID,C.Score from Students as s inner join score as c on (s.scode=c.studentID)
三表内联接:select s.SName,cs.CourseName,C.Score from Students as s inner join score as c on (s.scode=c.studentID) inner join course as cs on (cs.CourseId=c.courseId)
外联接:select s.SName,c.courseID,C.Score from Students as s left join score as c on(s.scode=c.studentId )