Multiple choice technology databases

Which two statements about subqueries are true? (Choose two.)

  1. A single row subquery can retrieve data from only one table

  2. A SQL query statement cannot display data from table B that is referred to in its subquery, unless table B is included in the main query's FROM clause.

  3. A SQL query statement can display data from table B that is referred to in its subquery, without including table B in its own FROM clause.

  4. A single row subquery can retrieve data from more than one table

  5. A single row subquery cannot be used in a condition where the LIKE operator is used for comparison

  6. A multiple-row subquery cannot be used in a condition where the LIKE operator is used for comparison.

Reveal answer Fill a bubble to check yourself
B,D Correct answer
Explanation

A subquery can reference table B in its FROM clause, but the main query must also include table B in its FROM clause to display its columns - table references in subqueries are not automatically visible in the main query. Single-row subqueries can retrieve data from multiple tables using joins in their own FROM clause. Multiple-row subqueries can use LIKE comparisons.