Skip to content
Sharp

SQL for Java Devs · interview question

Why does using a RIGHT JOIN between two tables, 'suppliers' and 'products', on the result set change runtime behavior?

Multiple choiceMediumchapter-8-curatedpremiumsql-for-java-devsjoins
Choose one answer
Answer and explanation

Correct answer

A. All records from 'products' and matched records from 'suppliers'

Why

A RIGHT JOIN returns all records from the right table ('products') and the matched records from the left table ('suppliers'). If there's no match, NULLs appear for columns from the left table.

Test yourself on SQL for Java Devs

A free test with instant, explained results. No account needed.

Start free test
All SQL for Java Devs questions →