Oracle Database 12c: SQL Fundamentals — Question 11
Where can sub queries be used? (Choose all that apply)
Answer options
- 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
Correct answer: A, B, C, F
Explanation
Subqueries can be utilized in various parts of a SQL statement such as the SELECT field names, the FROM clause, the HAVING clause, and the WHERE clause of SELECT and other DML statements. Options D and E are incorrect as subqueries cannot be used in the GROUP BY clause and are limited in scope within the WHERE clause of a SELECT statement.