Which JOIN type returns only matched rows from both tables?

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

Multiple Choice

Which JOIN type returns only matched rows from both tables?

When you want only the records that have matching values in both tables, you use an inner join. It returns the intersection of the two datasets based on the join condition, so a row appears only if there’s a corresponding row in the other table that satisfies the match. For example, joining customers and orders on customer_id yields customers who have placed orders, along with their order details, and excludes customers with no orders.

The other join types behave differently: a full outer join brings in all rows from both tables, with NULLs where there’s no match; a cross join creates every possible pairing of rows (Cartesian product); a left join returns all rows from the left table and the matching rows from the right (and NULLs for the right side when there’s no match).

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy