Skip to content
Tunely

SQL Joins study song

Quick answer

A SQL join combines rows from two tables based on a related column, usually a foreign key matched to a primary key. Database exams love to give two small tables and ask how many rows each join type returns, so you need to know exactly what happens to unmatched rows.

Inner joins drop them, outer joins keep them and fill gaps with NULL. A second favourite is the order SQL processes a query, which explains why WHERE cannot use an aggregate but HAVING can. Both topics are short sequences of rules, so a rap with a verse per join type and a chorus for the query order turns them into something you can recite instead of re-derive.

5 facts to know about sql joins

  1. 1INNER JOIN returns only the rows that have a match in both tables.
  2. 2LEFT JOIN returns every row from the left table and fills the right table's columns with NULL where there is no match.
  3. 3FULL OUTER JOIN returns all rows from both tables, with NULL on whichever side has no match.
  4. 4A CROSS JOIN of tables with m and n rows returns m × n rows.
  5. 5SQL logically evaluates FROM, WHERE, GROUP BY, HAVING, SELECT, then ORDER BY, so HAVING filters groups after aggregation.

Hear what a study song sounds like

SQL Joins: common questions

What are the key facts about sql joins?

INNER JOIN returns only the rows that have a match in both tables. LEFT JOIN returns every row from the left table and fills the right table's columns with NULL where there is no match. FULL OUTER JOIN returns all rows from both tables, with NULL on whichever side has no match.

How does a song help you remember sql joins?

A second favourite is the order SQL processes a query, which explains why WHERE cannot use an aggregate but HAVING can. Both topics are short sequences of rules, so a rap with a verse per join type and a chorus for the query order turns them into something you can recite instead of re-derive.

Can I make a sql joins song from my own computer science notes?

Yes. Paste your notes or upload a PDF, photo or lecture link to Tunely. It pulls out the facts, writes lyrics (a rap style suits this topic) and checks every line against your source before recording a song with synced lyrics. Your first song each month is free.

More computer science songs

Create an account to record your song

Your drafts come with you. Every account gets 1 free song.

Keep the songs coming

You're out of songs. Your lyrics are saved.

Packs are one-time payments. A song that fails is refunded.

Tutor or teacher? Compare all plans