Multiple choice technology databases

Which three statements about SubQueries are true?

  1. A main query can have mroe than one subquery.

  2. A subquery can have more than one main query.

  3. The sub query and main query must retrieve data from the same table.

  4. The subquery and main query can retrieve data from different tables.

  5. Only one column or expression can be compared between the subquery and main query.

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

A main query can indeed contain multiple subqueries in different clauses (WHERE, FROM, SELECT). Subqueries and main queries can access entirely different tables - they're independent queries. When comparing a subquery result to the main query in a WHERE clause, only one column or expression can be compared (this is the scalar subquery pattern). Option B is false because a subquery is nested within one main query, not multiple.