PrepAway - Latest Free Exam Questions & Answers

Which two of the following queries will display the employee name and department name for all employees that a

Given the following two tables:
EMPLOYEE
ID NAME DEPTID
— —————- —
01 Mick Jagger 10
02 Keith Richards 20
03 Ronnie Wood 20
04 Charlie Watts 20
05 Bill Wyman 30
06 Brian Jones DEPARTMENT
ID DEPTNAME
— ——————
10 Executive Staff
20 Sales
30 Marketing
40 Engineering
50 Human Resources
Which two of the following queries will display the employee name and department name for all
employees that are in Sales?

PrepAway - Latest Free Exam Questions & Answers

A.
SELECT e.name,d.deptname
FROM employee e, department d
WHERE e.deptid = d.id AND d.id = ’20’

B.
SELECT e.name,d.deptname
FROM employee e FULL OUTER JOIN department d
ON e.deptid = d.id
WHERE d.id = ’20’

C.
SELECT e.name,d.deptname
FROM employee e RIGHT OUTER JOIN department d
ON e.deptid = d.id
WHERE d.id = ’20’

D.
SELECT e.name,d.deptname
FROM employee e LEFT OUTER JOIN department d
ON e.deptid = d.id
WHERE d.id = ’20’

E.
SELECT e.name,d.deptname
FROM employee e INNER JOIN department d
ON e.deptid = d.id
WHERE d.id = ’20’

3 Comments on “Which two of the following queries will display the employee name and department name for all employees that a


Leave a Reply