Where can subqueries be used? (Choose all that apply.)
A.
field names in the SELECT statement
B.
the FROM clause in the SELECT statement
C.
the HAVING clause in the SELECT statement
D.
the GROUP BY clause in the SELECT statement
E.
the WHERE clause in only the SELECT statement
F.
the WHERE clause in SELECT as well as all DML statements
Explanation:
SUBQUERIES can be used in the SELECT list and in the FROM, WHERE, and HAVING clauses
of a query.
A subquery can have any of the usual clauses for selection and projection.
The following are required clauses:
– A SELECT list
– A FROM clause
The following are optional clauses:
WHERE
GROUP BY
HAVING
The subquery (or subqueries) within a statement must be executed before the parent query that
calls it, in order that the results of the subquery can be passed to the parent.