Where can sub queries 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
why D/E are wrong?
D.
the GROUP BY clause in the SELECT statement
E.
the WHERE clause in only the SELECT statement
got it.
D – cause it can return scalar and doesn’t make sense to group by
E – Can be in WHERE from DELETE