nerdexam
CompTIACompTIA

DS0-001 · Question #19

DS0-001 Question #19: Real Exam Question with Answer & Explanation

The correct answer is A: UNION. The SQL command that the administrator should use to ensure that records from the two tables are not duplicated is option A. This command uses the UNION clause to combine the records from the legacy table and the newer table into a single result set. The UNION clause also elimina

Database Fundamentals

Question

A database administrator is migrating the information in a legacy table to a newer table. Both tables contain the same columns, and some of the data may overlap. Which of the following SQL commands should the administrator use to ensure that records from the two tables are not duplicated?

Options

  • AUNION
  • BJOIN
  • CINTERSECT
  • DCROSS JOIN

Explanation

The SQL command that the administrator should use to ensure that records from the two tables are not duplicated is option A. This command uses the UNION clause to combine the records from the legacy table and the newer table into a single result set. The UNION clause also eliminates any duplicate records that may exist in both tables, and sorts the result by default. The other options either do not produce the desired result or have syntax errors. For example, option B would join the records from the two tables based on a common column, but not remove any duplicates; option C would return only the records that are common to both tables, but not the ones that are unique to each table; option D would produce a Cartesian product of the records from the two tables, which would increase the number of duplicates.

Topics

#SQL Commands#Set Operators#Data Migration#Duplicate Data Handling

Community Discussion

No community discussion yet for this question.

Full DS0-001 PracticeBrowse All DS0-001 Questions