---
title: "What is an SQL subquery?"  
description: "What is an SQL subquery?"  
author: "Sumit Kesarwani"  
published: 2014-08-24  
updated: 2020-09-16  
canonical: https://www.mindstick.com/interview/1991/what-is-an-sql-subquery  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 1 minute  

---

# What is an SQL subquery?

An SQL subquery is a means of querying two or more tables at the same time. The subquery itself is an SQL SELECT statement contained within the WHERE clause of another SQL SELECT statement, and separated by being enclosed in parenthesis. Some subqueries have equivalent SQL join structures, but correlated subqueries cannot be duplicated by a join.

## Answers

### Answer by Sumit Kesarwani

An SQL subquery is a means of querying two or more tables at the same time. The subquery itself is an SQL SELECT statement contained within the WHERE clause of another SQL SELECT statement, and separated by being enclosed in parenthesis. Some subqueries have equivalent SQL join structures, but correlated subqueries cannot be duplicated by a join.


---

Original Source: https://www.mindstick.com/interview/1991/what-is-an-sql-subquery

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
