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 25

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


Anna

Anna

Why D?
I think the correct response is A
Is ‘nt Natual Join for columns with the same name?

Fabricio

Fabricio

I think B is the correct one

Sergio

Sergio

I also think so. We have to retrieve those null values in e.manager_id, and e table is in the left side of the join.

Marcelo

Marcelo

I also think that B is correct.
LEFT OUTER JOIN
Retrieves the records that match the table right and also those of the left table records that do not match.

Luiz

Luiz

Cesário,

I Agree with You the answer B is the correct one.

lbien

lbien

Where is Cesario 🙂

Mac/Philippines

Mac/Philippines

A is wrong. Using “Join” can only produce matching values from two tables ignoring null values. So since the required output needs to show the employees even without manager then that is the time that were going to use LEFT OUTER JOIN. And so the correct answer is B.

Mac/Philippines

Mac/Philippines

Correction: What I mean is Option D is wrong. Correct answer is B.

Mug

Mug

share with us the updated dump the total of 74 question are not enough to pass this exam. I passes the first sitting and I found the different question than this dump only 25 question are valid in this blog the others are new out of 75 total question

Mac/Philippines

Mac/Philippines

What do you mean? the answers in this website are not reliable?

Leandro

Leandro

rofl
No, really, I literally laughed hard for this one. My wife just came to see why I was laughing 😛

Sayed

Sayed

Hi Mug, what are the other questions?

Arnab

Arnab

I completed my exam a few moments back and not more than 10-15 questions are from this site.

sudhakar

sudhakar

Arnab, which exam did you take? is it 1z0-061?

shiva

shiva

arnab sir I scheduled my oracle 1z0-061 exam tomorrow. and i practised the question that are available on this site.
would I be able to clear the exam or not? If not, then can you please send me the updated dumps on [email protected]

sudhakar

sudhakar

can you please send the questions and answers?

Afonso - Mozambique

Afonso - Mozambique

The correct Answer is B. Dont memorize the answers…study until you can’t get it wrong

Suyog

Suyog

B is Correct answer.