Recall & Review
beginner
What does an INNER JOIN do in SQL?
An INNER JOIN returns only the rows where there is a match in both tables based on the join condition.
Click to reveal answer
beginner
In an INNER JOIN, what happens if a row in one table has no matching row in the other table?
That row is not included in the result because INNER JOIN only shows rows with matches in both tables.
Click to reveal answer
intermediate
How does PostgreSQL execute an INNER JOIN internally?
PostgreSQL finds pairs of rows from both tables that satisfy the join condition, often using indexes or scanning tables, then combines those rows into the result.
Click to reveal answer
intermediate
What is the difference between INNER JOIN and LEFT JOIN in terms of execution?
INNER JOIN returns only matching rows from both tables, while LEFT JOIN returns all rows from the left table and matches from the right, filling with NULLs if no match.
Click to reveal answer
intermediate
Why is it important to have indexes on join columns for INNER JOIN execution?
Indexes speed up finding matching rows between tables, making INNER JOIN queries faster and more efficient.
Click to reveal answer
What rows does an INNER JOIN return?
✗ Incorrect
INNER JOIN returns only rows where the join condition matches in both tables.
If a row in the left table has no matching row in the right table, what does INNER JOIN do?
✗ Incorrect
INNER JOIN excludes rows without matches in the other table.
Which of these helps PostgreSQL speed up INNER JOIN execution?
✗ Incorrect
Indexes on join columns help PostgreSQL quickly find matching rows.
What is the main difference in output between INNER JOIN and LEFT JOIN?
✗ Incorrect
LEFT JOIN includes all rows from the left table, even if no match exists.
During INNER JOIN execution, what does PostgreSQL do?
✗ Incorrect
PostgreSQL finds matching rows that satisfy the join condition and returns combined rows.
Explain how INNER JOIN works when executed in PostgreSQL.
Think about how two lists are matched by a common key.
You got /4 concepts.
Describe the difference between INNER JOIN and LEFT JOIN in terms of their output.
Consider what happens when one table has rows without matches in the other.
You got /4 concepts.