nerdexam
Exams1Z0-060Questions#159
Oracle

1Z0-060 · Question #159

1Z0-060 Question #159: Real Exam Question with Answer & Explanation

The correct answer is A: Self-join. This question tests the ability to identify which SQL techniques can detect rows with duplicate non-key column values across different primary key values in the same table.

Question

Examine the structure of the customers table: CUSTNO is the primary key in the table. You want to find out if any customers' details have been entered more than once using different CUSTNO, by listing all the duplicate names. Which two methods can you use to get the required result?

Exhibit

1Z0-060 question #159 exhibit

Options

  • ASelf-join
  • BSubquery
  • CFull outer-join with self-join
  • DLeft outer-join with self-join
  • ERight outer-join with self-join

Explanation

This question tests the ability to identify which SQL techniques can detect rows with duplicate non-key column values across different primary key values in the same table.

Common mistakes.

  • C. A full outer join returns all rows from both sides of the join including non-matching rows, which adds irrelevant data and does not improve duplicate detection beyond what a simple self-join provides.
  • D. A left outer join preserves all rows from the left table regardless of whether they match, introducing unnecessary rows that complicate rather than simplify finding duplicates.
  • E. A right outer join preserves all rows from the right table regardless of match status, which similarly adds unwanted complexity without offering any advantage over a standard self-join for this use case.

Concept tested. Self-join and subquery for duplicate data detection

Reference. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/SELECT.html

Community Discussion

No community discussion yet for this question.

Full 1Z0-060 Practice