Which SQL statement would give you the desired result?

View the Exhibit and examine the structure of the EMPLOYEES table. You want to know the FIRST_NAME and SALARY for all employees who have the same manager as that of the employee with the first name ‘Neena’ and have salary equal to or greater than that of ‘Neena’. Which SQL statement would give you the desired result?

View the Exhibit and examine the structure of the EMPLOYEES table

You want to know the FIRST_NAME and SALARY for all employees who have the same manager as that of the employee with the first name ‘Neena’ and have salary equal to or greater than that of ‘Neena’.

Which SQL statement would give you the desired result?

A.
SELECT first_name, salary
FROM employees
WHERE (manager_id, salary) >= ALL (SELECT manager_id, salary FROM employees
WHERE first_name = ‘Neena’ )
AND first_name <> ‘Neena’;

B.
SELECT first_name, salary
FROM employees
WHERE (manager_id, salary) >= (SELECT manager_id, salary FROM employees
WHERE first_name = ‘Neena’ )
AND first_name <> ‘Neena’;

C.
SELECT first_name, salary
FROM employees
WHERE (manager_id, salary) >= ANY (SELECT manager_id, salary FROM employees
WHERE first_name = ‘Neena’ )
AND first_name <> ‘Neena’;

D.
SELECT first_name, salary
FROM employees
WHERE ( manager_id = (SELECT manager_id
FROM employees
WHERE first_name = ‘Neena’ )
AND salary >= ( SELECT salary
FROM employees
WHERE first_name = ‘Neena’ ) )
AND first_name <> ‘Neena’;



Leave a Reply 4

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


user

user

Answer A, B, C will cause ORA-01796 ERROR

ORA-01796: this operator cannot be used with lists
01796. 00000 – “this operator cannot be used with lists”

user

user

>= ALL
>= ANY
Above operators they cannot be used with lists.
For IN, it is okay can be used with lists.

More methods

More methods

It’s going to be ending of mine day, except before finish I am reading this impressive article to improve my knowledge.|

click the following article

click the following article

Thank you for any other excellent post. Where else may just anyone get that type of info in such an ideal manner of writing? I have a presentation subsequent week, and I’m on the search for such info.|