Oracle Database 11g: SQL Fundamentals I — Question 6
Which two statements about sub queries are true? (Choose two.)
Answer options
- A. A sub query should retrieve only one row.
- B. A sub query can retrieve zero or more rows.
- C. A sub query can be used only in SQL query statements.
- D. Sub queries CANNOT be nested by more than two levels.
- E. A sub query CANNOT be used in an SQL query statement that uses group functions.
- F. When a sub query is used with an inequality comparison operator in the outer SQL statement, the column list in the SELECT clause of the sub query should contain only one column.
Correct answer: B, F
Explanation
Option B is correct because a sub query can indeed return zero, one, or multiple rows based on the conditions. Option F is also correct, as using an inequality comparison requires the sub query to select only one column to ensure proper evaluation. The other options are incorrect because they either impose unnecessary restrictions on sub queries or misrepresent their capabilities.