Which SQL query gets the required output?

Examine the structure of the employees table:

There is a parent/child relationship between EMPLOYEE_ID and MANAGER_ID. You want
to display the name, joining date, and manager for all the employees. Newly hired
employees are yet to be assigned a department or a manager. For them, ‘No Manager1
should be displayed in the manager column.
Which SQL query gets the required output?

Examine the structure of the employees table:

There is a parent/child relationship between EMPLOYEE_ID and MANAGER_ID. You want
to display the name, joining date, and manager for all the employees. Newly hired
employees are yet to be assigned a department or a manager. For them, ‘No Manager1
should be displayed in the manager column.
Which SQL query gets the required output?

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
http://ivrainbow65.blogspot.com/



Leave a Reply 3

Your email address will not be published. Required fields are marked *


luis

luis

Answer is B

D is wrong natural join dont use a ‘On’ clausule also since you must show all the employees a left or rigth is needed, so it would be for that query ‘natural left join’

mara2

mara2

Answer is B

9jansen

9jansen

B

For Option D, the ON and NATURAL keywords cannot appear together in a join clause.
See page 316 of OCA/OCP Oracle Database 12c All-in-One Exam Guide from Oracle Press.