# Sub-Queries in T-SQL

Sub-Queries in T-SQL: Types of Sub-Queries, Where to Use Sub-Queries.

Updated: November 3, 2026

1. [Types of Sub-Queries](https://www.ask-codey.com/lessons/sub-queries-in-t-sql-types-of-sub-queries) (Journeyman): A sub-query is a query inside another query, in parentheses. An uncorrelated one runs once on its own; a correlated one uses the outer query's row and runs once per row.
2. [Where to Use Sub-Queries](https://www.ask-codey.com/lessons/sub-queries-in-t-sql-where-to-use-sub-queries) (Journeyman): A sub-query can stand in for a value, a list or a table. Use it in WHERE with =, IN, NOT IN or EXISTS, as a column in the SELECT, or as a table in the FROM.

Source: https://www.ask-codey.com/courses/csharp-full-stack-bootcamp/topics/sub-queries-in-t-sql
