Which JOIN type returns all rows from the right table and matched rows from the left?

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 all rows from the right table and matched rows from the left?

A RIGHT JOIN returns all rows from the right-hand table and the matching rows from the left-hand table. If a row in the right table has no corresponding row in the left table, the left-side columns appear as NULL in the result.

For example, if you have orders (order_id, customer_id) and customers (customer_id, name) and you join on customer_id, you'll get every order row. If an order has a customer_id that exists, you’ll see the customer’s name; if there’s no matching customer, the customer fields are NULL.

An INNER JOIN would include only rows with matches in both tables, so it wouldn’t guarantee every right-row appears. A LEFT JOIN would preserve all rows from the left table, not necessarily all right rows. A FULL OUTER JOIN would include unmatched rows from both tables, not just the right side.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy