PrepAway - Latest Free Exam Questions & Answers

Which of the following statements will list every employee number and last name, along with the employee numbe

Given the following table definitions:
DEPARTMENT
————————–
DEPTNO CHAR(3)
DEPTNAME CHAR(30)
MGRNO INTEGER
ADMRDEPT CHAR(3)
EMPLOYEE
————————–
EMPNO INTEGER
FIRSTNAME CHAR(30)
MIDINIT CHAR
LASTNAME CHAR(30)
WORKDEPT CHAR(3)
Which of the following statements will list every employee number and last name, along with the
employee number and last name of their manager, including employees that have not been
assigned to a manager?

PrepAway - Latest Free Exam Questions & Answers

A.
SELECTe.empno, e.lastname, m.empno, m.lastname FROM employee e LEFT INNER JOIN
department INNER JOIN employee m ON mgrno=m.empno ON e.workdept=deptno

B.
SELECTe.empno, e.lastname, m.empno, m.lastname FROM employee e LEFT OUTER JOIN
department INNER JOIN employee m ON mgrno=m.empno ON e.workdept=deptno

C.
SELECTe.empno, e.lastname, m.empno, m.lastname FROM employee e RIGHT OUTER JOIN
department INNER JOIN employee m ON mgrno=m.empno ON e.workdept=deptno

D.
SELECTe.empno, e.lastname, m.empno, m.lastname FROM employee e RIGHT INNER JOIN
department INNER JOIN employee m ON mgrno=m.empno ON e.workdept=deptno

3 Comments on “Which of the following statements will list every employee number and last name, along with the employee numbe


Leave a Reply