Questions: SQL: OUTER JOINs (LEFT, RIGHT, FULL)

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A query uses INNER JOIN to combine a customers table with an orders table. A customer named 'Smith' has never placed an order. What appears in the result?

ASmith appears with NULL values in the order columns
BSmith does not appear in the result at all
CSmith appears with empty strings in the order columns
DThe query returns an error because the join condition is not satisfied
Question 2 Multiple Choice

You want to find all customers who have NEVER placed an order. Which query achieves this?

ASELECT c.name FROM customers c INNER JOIN orders o ON c.id = o.customer_id WHERE o.id IS NULL
BSELECT c.name FROM customers c LEFT JOIN orders o ON c.id = o.customer_id WHERE o.id IS NULL
CSELECT c.name FROM customers c FULL OUTER JOIN orders o ON c.id = o.customer_id
DSELECT c.name FROM customers c RIGHT JOIN orders o ON c.id = o.customer_id WHERE o.id IS NULL
Question 3 True / False

A LEFT JOIN between tables A and B will always return at least as many rows as an INNER JOIN on the same tables with the same condition.

TTrue
FFalse
Question 4 True / False

NULL values in a LEFT JOIN result usually indicate missing or corrupt data in the database.

TTrue
FFalse
Question 5 Short Answer

Explain why you would use a LEFT JOIN instead of an INNER JOIN, and describe a scenario where the difference matters.

Think about your answer, then reveal below.