Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added diagram showing INNER and LEFT JOIN #362

Merged
merged 1 commit into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion episodes/03-sql-joins.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,14 @@ In fact the `JOIN` keyword is simply shorthand for `INNER JOIN` and the two
terms can be used interchangeably as they will produce the same result.

We can also tell the computer that we wish to keep all the records in the first
table by using a `LEFT OUTER JOIN` clause, or `LEFT JOIN` for short.
table by using a `LEFT OUTER JOIN` clause, or `LEFT JOIN` for short. The difference
between the two JOINs can be visualized like so:

![
Diagrams representing INNER JOIN and LEFT JOIN in SQLite
](fig/sql-joins.png){
alt='Diagrams representing INNER JOIN and LEFT JOIN each include two overlapping circles labeled A (left) and B (right). For INNER JOIN, the intersection of the two circles is filled in. The associated query is SELECT * FROM A JOIN B ON A.Key = B.Key. For LEFT JOIN, circle A, including its intersection with circle B, is filled in. The associated query is SELECT * FROM A LEFT JOIN B ON A.Key = B.Key.'
}

::::::::::::::::::::::::::::::::::::::: challenge

Expand Down
Binary file added episodes/fig/sql-joins.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.