nerdexam
CompTIA

DA0-001 · Question #400

A sales manager requested a report that contains the first name, last name, and phone number of all the company's customers and employees. The data engineer needs to return all the records from…

The correct answer is A. FULL OUTER JOIN. FULL OUTER JOIN returns all rows from both tables, regardless of whether there is a matching row in the other table. Where no match exists, it fills in NULLs for the missing side’s columns. This ensures you get all records from both the employees and customers tables, including…

Data Concepts and Environments

Question

A sales manager requested a report that contains the first name, last name, and phone number of all the company's customers and employees. The data engineer needs to return all the records from several tables, even duplicates. Which of the following is the best way to join the two tables?

Options

  • AFULL OUTER JOIN
  • BINNER JOIN
  • CLEFT OUTER JOIN
  • DCROSS JOIN

How the community answered

(35 responses)
  • A
    77% (27)
  • B
    14% (5)
  • C
    6% (2)
  • D
    3% (1)

Explanation

FULL OUTER JOIN returns all rows from both tables, regardless of whether there is a matching row in the other table. Where no match exists, it fills in NULLs for the missing side’s columns. This ensures you get all records from both the employees and customers tables, including duplicates and unmatched rows from either table. Since the requirement is to return all records from several tables, even duplicates, FULL OUTER JOIN is the correct choice as it combines all data from customers and employees, preserving all

Topics

#SQL Joins#Data Retrieval#Database Concepts

Community Discussion

No community discussion yet for this question.

Full DA0-001 Practice