Multiple choice technology programming languages

Sub-queries can be nested in…

  1. UPDATE, DELETE, INSERT and SELECT statements.

  2. INSERT statements only.

  3. UPDATE statements only.

  4. DELETE statements only.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Subqueries can indeed be nested within SELECT, INSERT, UPDATE, and DELETE statements in SQL. They allow you to use the result of one query to filter or provide values for another query. Options B, C, and D are incorrect because they are overly restrictive - subqueries work in all four types of statements.

AI explanation

Subqueries (nested SELECT statements) can appear inside SELECT, INSERT, UPDATE, and DELETE statements — for example, filtering rows to update or delete based on a subquery's result, or inserting rows selected from another table. They aren't restricted to just one of these statement types.