AI-assisted, automatically checked• Updated August 2026

SQL Queries & Subqueries MCQs

MCQs on nested subqueries, correlated queries, EXISTS, and IN operators.

3 MCQsSubtopic of SQLProgrammingAll Levels
Subtopic Focus & Conceptual Depth

Deep-dive into Queries & Subqueries principles within SQL. These targeted questions evaluate edge-cases, common pitfalls, and interview problem patterns.

Skill Level
Focused Subtopic Mastery
Explanation Depth
Code Snippets & Analysis
Exam Scope
Campus Hiring & GATE CS

Core SQL Fundamentals Quiz

10 questions · Interactive timed test · Instant score & review

Other SQL Subtopics

All SQL MCQsQueries & SubqueriesJoins

Queries & Subqueries MCQ Questions

Page 1 of 1 (3 total)
Q1

What is a correlated subquery in SQL?

hard
View Answer & Explanation
Correct Answer: A subquery that references a column from the outer query and is re-evaluated for each row of the outer query
Explanation:
Because a correlated subquery runs once per outer row, it can be slower on large tables compared to an equivalent join, though it is sometimes the clearest way to express a condition.
Q2

What is the purpose of the SQL 'ANY' and 'ALL' operators used with a subquery?

hard
View Answer & Explanation
Correct Answer: ANY returns true if the comparison holds for at least one value returned by the subquery, while ALL requires it to hold for every value
Explanation:
For example, WHERE salary > ALL (subquery) checks that a salary is greater than every value returned by the subquery, while ANY only requires it to beat at least one of them.
Q3

Which SQL operator returns true if a subquery returns at least one row?

medium
View Answer & Explanation
Correct Answer: EXISTS
Explanation:
The EXISTS operator tests for the existence of any record in a subquery and returns true as soon as the first matching row is found.