Joining Tables - Database Cheat Sheet
Every kind of join on two A4 pages: INNER, LEFT, RIGHT and FULL OUTER, self joins, CROSS JOIN and three table joins. Each one has a query that was run and the result it really returned.
On the sheet:
- Which rows come back: the four joins as diagrams
- INNER and LEFT JOIN: the same question, side by side
- Find what has no match: LEFT JOIN with IS NULL
- Three tables: joining through a link table
- Which join do I need?: a decision table
- Self join and CROSS JOIN: a table joined to itself
- FULL OUTER JOIN, two ways: including the MySQL form
- Common mistakes: four, each with its measured result
- Quick check and glossary: five questions, nine terms
Two A4 pages, printed front and back, sized to print once and keep beside you while you work. Written in short sentences and plain English, for readers whose first language is not English and clearer for everyone else because of it.
It pairs with the Joining Tables Together (JOINs), Advanced Joins and SQL JOINs books, so you can learn each idea in full and then revise it here in two pages.
Every query on this sheet was run against a live database before the page was printed, so the result you read is the result you get. Instant PDF download. By M.R. Sterling.