160k views
1 vote
The EMPLOYEE_ID column in the EMPLOYEES table corresponds to the EMPLOYEE_ID column of the ORDERS table.

The EMPLOYEE_ID column in the ORDERS table contains null values for rows that you need to display.
Which type of join should you use to display the data?
A.Natural join
B.Self-join
C.Equijoin
D.Outer join

User Arjit
by
8.4k points

1 Answer

3 votes

Final answer:

An Outer join should be used to show all records from the EMPLOYEES table along with matching records from the ORDERS table, including those rows where the ORDERS table has null values for EMPLOYEE_ID.

Step-by-step explanation:

To display data from the EMPLOYEES table where the EMPLOYEE_ID column corresponds to the EMPLOYEE_ID in the ORDERS table, particularly when the ORDERS table contains null values, an Outer join should be used. This type of join will include all records from the EMPLOYEES table and the matched records from the ORDERS table. If there is no match, the result is null on the side of the ORDERS table. This allows you to see which employees have orders assigned to them and which do not.

User Amica
by
8.6k points