$ ./guess_the_languageSQL & Databases
SQL & Databases · easy · #7

How many rows does the join return?

-- a.id: 1, 2, 3
-- b.id: 2, 3, 4
SELECT * FROM a
JOIN b ON a.id = b.id;
  1. 2
  2. 4
  3. 6
  4. 3
An inner join keeps only matching keys, and only 2 and 3 appear in both tables.
Play SQL & Databases ▸