Which SQL join returns all rows from the left table and matched rows from the right, with nulls where there is no match?

Prepare for the TJR Bootcamp Test with flashcards and detailed questions. Get hints and explanations for each query. Ace your exam!

Multiple Choice

Which SQL join returns all rows from the left table and matched rows from the right, with nulls where there is no match?

This tests how different joins shape the result set. A left outer join keeps every row from the left table and brings in matching rows from the right table. If there’s no match on the right, the right-side columns appear as nulls. That behavior exactly matches the prompt: all rows from the left table, with data from the right only when a match exists, and nulls where there isn’t a match.

Think of it like listing all customers and their orders. You want every customer shown, and for those who have orders you’ll see the order details; for customers without orders, the order fields will be null. That’s not how inner joins work—those require a match on both sides and would drop customers with no orders. Right outer joins flip which side is preserved, keeping all rows from the right instead, while full outer joins keep all rows from both sides.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy