SQL Full Outer Join

6.FULL OUTER JOIN includes rows when:
  • A. They match on key
  • B. They do not match
  • C. They either match or not
  • D. Only if NULL

They either match or not

They either match or not

7.What happens when neither table has matching keys in FULL OUTER JOIN?
  • A. Returns 0 rows
  • B. All rows with NULLs from other table
  • C. Only matching rows
  • D. Only matching rows

All rows with NULLs from other table

All rows with NULLs from other table

8.Output for: If A: ids 1,2 and B: ids 3,4 — how many rows?
SELECT * FROM A FULL OUTER JOIN B ON A.id = B.id;
  • A. 2
  • B. 4
  • C. 1
  • D. 0

4

4

9.Which of the following is closest to FULL OUTER JOIN in MySQL?
  • A. LEFT JOIN only
  • B. RIGHT JOIN only
  • C. LEFT JOIN + RIGHT JOIN + UNION
  • D. INNER JOIN + CROSS JOIN

LEFT JOIN + RIGHT JOIN + UNION

LEFT JOIN + RIGHT JOIN + UNION