Which three statements are true about multiple-row sub queries?

Which three statements are true about multiple-row sub queries? (Choose three.)

Which three statements are true about multiple-row sub queries? (Choose three.)

A.
They can contain a subquery within a sub query.

B.
They can return multiple columns as well as rows.

C.
They cannot contain a sub query within a sub query.

D.
They can return only one column but multiple rows.

E.
They can contain group functions and GROUP BY and HAVING clauses.

F.
They can contain group functions and the GROUP BY clause, but not the HAVING clause.



Leave a Reply 5

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


prince jain

prince jain

option D is right instead of B.

Multiple-row subqueries are nested queries that can return more than one row of results to the parent query. Multiple-row subqueries are used most commonly in WHERE and HAVING clauses. Since it returns multiple rows,it must be handled by set comparison operators (IN, ALL, ANY).While IN operator holds the same meaning as discussed in earlier chapter, ANY operator compares a specified value to each value returned by the sub query while ALL compares a value to every value returned by a sub query.

Sergio Sathler

Sergio Sathler

Well, it depends on where the subquery is used.

the king

the king

Subqueries that can return more than one row (but only one column) to the outer statement are called multiple-row subqueries.
why is D wrong?

Michal

Michal

select first_name, last_name from employees where (first_name, last_name) = (select first_name, last_name from employees where employee_id=100);

Nobody

Nobody

select first_name,last_name from EMPLOYEES where (first_name, last_name) in (select first_name,last_name from EMPLOYEES where manager_id=100);