Joins · SQL SQL

What is the primary difference between an INNER JOIN and a LEFT OUTER JOIN in ANSI SQL?

Practice question from Joins (SQL SQL), with the correct answer and a step-by-step solution.

easy · MCQ · Q-B4E7E2

What is the primary difference between an INNER JOIN and a LEFT OUTER JOIN in ANSI SQL?

  1. A.INNER JOIN returns all rows from both tables, while LEFT OUTER JOIN returns only matching rows.
  2. B.INNER JOIN returns only matching rows from both tables, while LEFT OUTER JOIN includes all rows from the left table regardless of whether there is a match in the right table.Correct answer
  3. C.LEFT OUTER JOIN requires a WHERE clause, whereas INNER JOIN does not.
  4. D.There is no functional difference; they are aliases for the same operation.

Solution

An INNER JOIN filters the result set to include only the rows that satisfy the join condition in both tables. A LEFT OUTER JOIN ensures that all rows from the left-hand table are preserved, filling in NULL values for columns from the right-hand table if no match is found.

More from Joins

All of Joins

Practise more SQL

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed