# Where to Use Sub-Queries

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.

![Cheat sheet: Where to Use Sub-Queries](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/750746a39942453491b232adcbae441f.webp)

- Category: SQL
- Level: Journeyman
- Tags: EXISTS Predicate, IN Predicate, Scalar Subquery, sql, Table Subquery, t-sql
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/sub-queries-in-t-sql-where-to-use-sub-queries-cheat-sheet
