Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 160

You must find the number of employees whose salary is lower than employee 110.

Which statement fails to do this?

    Correct Answer: A

    The statement in option A fails to find the number of employees whose salary is lower than employee 110 because it uses an incorrect reference in the subquery. The subquery references the outer query's table alias (e.employee_id) instead of its own alias (a.employee_id), which causes an error since the subquery does not have a limitation to fetch rows properly. This mistake results in an error commonly referred to as 'ORA-01427: single-row subquery returns more than one row'.

Discussion
alic_alexOption: A

fail A - because in the subquery exist condition referenced to main table but not subquery table. By other words, in the subquery not exist limitation for fetching rows and subquery return more than one row

7dc4ae8Option: A

A fails

Arth1989Option: A

alic_alex, I am sorry but where did you see the EXIST condition in A?

zouveOption: A

is the A the correct A is select count(*) from hr.employees e where e.salary < (select a.salary from hr. employees a where a.employee_id=110);

TomZhOption: A

A -failed with "ORA-01427: single-row subquery returns more than one row"

ArslanAltafOption: A

AD Both similar results. A should be preferred

[Removed]Option: A

Because it is incorret

deepzsivaOption: A

Correct Answer is A. Tested.

lucemqyOption: A

A is correct

Rik92Option: A

Answer by alic_alex explains it well.

DarnunOption: A

A fails due to the wrong condition in subquery

BeeshoOption: A

i would say A

jfc1Option: C

A,B,D give the same result. But C is different I suggest C