exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 184 discussion

Actual exam question from Microsoft's 70-761
Question #: 184
Topic #: 1
[All 70-761 Questions]

You are developing a database to track employee progress relative to training goals. You run the following Transact-SQL statements:

You must build a report that shows all Employees and the courses that they have taken. Employees that have not taken training courses must still appear in the report. The report must display NULL in the course column for these employees.
You need to create a query for the report.

A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: C
Incorrect Answers:
A, B: JOIN and INNER JOIN displays only the rows that have a match in both joined tables
References:
https://www.mssqltips.com/sqlservertip/1667/sql-server-join-example/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
AshleyLiang
Highly Voted 5 years, 9 months ago
Answer should be D because all employees need to be returned.
upvoted 42 times
...
mattia_88
Highly Voted 5 years, 7 months ago
RIGHT JOIN is correct (answer D)
upvoted 7 times
...
stm22
Most Recent 4 years, 11 months ago
D is only answer that all employees are returned.
upvoted 1 times
...
rustyG
4 years, 11 months ago
it could be right or left join. It depends upon which side the employee table is located. Since the order is Courses -> course taken -> employee, left join appeared to be more correct.
upvoted 1 times
...
Anette
5 years ago
Right Join is needed. D
upvoted 1 times
...
safiullah
5 years, 9 months ago
I agree with AshleyLiang because we need all employees whether they have taken courses or not and since the employee table is at the right side in the multiple join query therefore RIGHT JOIN will return the employees with NULL as stated in the question
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...