Which of the following join operations does ORACLE support?
2009
Which of the following join operations does ORACLE support?
Answer: D. inner join, outer join, semi join and anti join — Concept: A relational join is classified by which rows survive the match. An inner join keeps only matched rows. An outer join (LEFT/RIGHT/FULL) additionally…
- A.
inner join and outer join only
- B.
outer join and semi join only
- C.
inner join, outer join and semi join only
- D.
inner join, outer join, semi join and anti join
Attempted by 204 students.
Show answer & explanation
Correct answer: D
Concept: A relational join is classified by which rows survive the match. An inner join keeps only matched rows. An outer join (LEFT/RIGHT/FULL) additionally keeps unmatched rows from one or both sides. A semi join and an anti join are existence-based joins that never pull in columns from the second table: a semi join returns each first-table row once when a match exists elsewhere (the EXISTS/IN pattern), and an anti join returns each first-table row when NO match exists elsewhere (the NOT EXISTS/NOT IN pattern).
Application: Oracle's SQL engine implements all four categories. Inner joins and one-sided (LEFT/RIGHT) outer joins have been available since Oracle's earliest SQL releases through Oracle's own equijoin and "(+)" outer-join syntax; a FULL outer join needed a UNION-based workaround until ANSI-standard JOIN keywords -- including native FULL OUTER JOIN -- arrived in Oracle 9i. Semi joins and anti joins are not written with a dedicated JOIN keyword; instead Oracle's optimizer can recognise an eligible EXISTS/IN subquery as a semi join and an eligible NOT EXISTS/NOT IN subquery as an anti join, executing them as such -- visible in an execution plan as operations like HASH JOIN SEMI and HASH JOIN ANTI. This optimizer-level support for semi and anti joins has been present since Oracle 8, well before this question was set, alongside Oracle's long-standing inner/outer join support.
Cross-check (contrast every listed option by its own value):
inner join and outer join only -- accurate about those two categories, but omits semi and anti joins, which Oracle also implements at the optimizer level.
outer join and semi join only -- accurate about those two, but omits inner join (Oracle's most basic join type) and anti join.
inner join, outer join and semi join only -- covers three of the four categories Oracle implements, leaving out anti join.
inner join, outer join, semi join and anti join -- names all four categories that Oracle's SQL engine and optimizer implement, with none omitted and nothing added beyond what Oracle supports.
Result: Oracle supports inner joins, outer joins, semi joins, and anti joins, so the option naming all four -- inner join, outer join, semi join and anti join -- is correct (per Oracle SQL Language Reference on joins and subquery-driven semi/anti-join execution plans).