SaveSnippets
Community
Pricing
Sign In
Get Started
Community
Public Snippets
2
Code shared by the SaveSnippets community — browse, copy, and get inspired.
All Languages
Bash
Go
HTML
Java
JavaScript
Kotlin
PHP
Python
Rust
SQL
TypeScript
#subquery
Clear
Tags
#php
#kotlin
#bash
#go
#sql
#rust
#typescript
#html
#java
#python
#files
#utils
#strings
#http
#concurrency
#async
#json
#arrays
#security
#types
#crypto
#database
#dates
#format
SQL
Correlated Subquery
A subquery that references the outer query's row. Slower than a JOIN for big result sets but sometimes the most readable expression.
#sql
#subquery
#correlated
SQL
EXISTS vs IN — Subquery Filtering
Both check membership. `EXISTS` is usually faster for big subqueries (stops at first hit). `IN` is more readable for small fixed lists. `NOT IN` is dangerous with NULLs — prefer `NOT EXISTS`.
#sql
#exists
#in
#subquery
#null-safe