SQL Joins · Question 7 · Easy

Which of these is equivalent to A RIGHT JOIN B ON A.k = B.k (ignoring column order)?

  1. B LEFT JOIN A ON A.k = B.k
  2. A LEFT JOIN B ON A.k = B.k
  3. A INNER JOIN B ON A.k = B.k
  4. A CROSS JOIN B
Answer and explanation

Answer: A. B LEFT JOIN A ON A.k = B.k

Explanation: A right join keeps every row of the right table B. Swapping the tables and using a left join keeps the same table, B, so the two return the same rows.

Previous: Table Staff: emp_id | name | manager_id 1 | Nandini | NULL 2 | Omkar | 1 3 |… · Next: Table Teams: team_id | team | city 1 | CSK | Chennai 2 | MI | Mumbai 3 | RCB |…

Practise sql joins

Try a fresh set of sql joins questions with an explanation after every answer, free and without signing up: SQL Joins practice. Or sit a full placement mock test.

More sql joins questions

More sql practice

Aggregates & GROUP BY · Subqueries & CTEs · Window Functions · NULL Handling · SQL Functions & CASE · UNION, INTERSECT & EXCEPT · Tables, Keys & Constraints · DML & Transactions

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge