1 / 18

The Inner Join and Outer Joins

The Inner Join and Outer Joins. Dec 15 2004. Dancing and Tennis. Dancing only. Tennis Only. The Whole Picture. A. B,D,F. C. G. The Inner Join. B,D,F. Inner. The Left Outer Join. A. B,D,F. G. Left. Inner. The Right Outer Join. B,D,F. C. Right. Inner. The Full Outer Join.

amos-baker
Download Presentation

The Inner Join and Outer Joins

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Inner Join and Outer Joins Dec 15 2004

  2. Dancing and Tennis Dancing only Tennis Only The Whole Picture A B,D,F C G

  3. The Inner Join B,D,F Inner

  4. The Left Outer Join A B,D,F G Left Inner

  5. The Right Outer Join B,D,F C Right Inner

  6. The Full Outer Join A B,D,F C G Right Left Inner

  7. The Exclusive Join A C G Right Left

  8. Using Plausible Keys To link The tables together …. dance ____ JOIN tennis ON dance.scode=tennis.scode

  9. The Inner Join SELECT * FROM dance inner join tennis On dance.scode=tennis.scode B,D,F Inner

  10. The Left Outer Join SELECT * FROM dance left outer join tennis On dance.scode=tennis.scode A B,D,F G Left Inner

  11. The Right Outer Join SELECT * FROM dance right outer join tennis On dance.scode=tennis.scode B,D,F C Inner Right

  12. The Full Outer Join SELECT * FROM dance full outer join tennis On dance.scode=tennis.scode A B,D,F C G Left Inner Right

  13. The Exclusive Join SELECT * FROM dance full outer join tennis On dance.scode=tennis.scode Where dance.scode is .null. Or tennis.scode is .null. A C G Left Right

  14. Court1 Court2 3:30 – 4:00 Session A 4:00 – 4:30 Session B

  15. Keys for Sessions:udate+session

  16. Keys for Sessions:udate+session court1____ JOIN court2 ON court1.udate=court2.udate and court1.session=court2.session ….. Using Plausible Keys To link The tables together

  17. Keys for Days:udate court1____ JOIN court2 ON court1.udate=court2.udate session ….. Using Plausible Keys To link The tables together Group By

More Related