FIND YOUR NEXT FEW LINES

Results for “related rows”

Small, practical examples. Search by task or narrow things down below.

1056 snippets foundClear filters
SQLBulk changes & set operations

Delete rows selected by a related table

SQL: A correlated EXISTS limits the delete to explicitly listed records.

SQL✓ Tested
SQL ServerBulk changes & set operations

Delete rows selected by a related table

SQL Server: A correlated EXISTS limits the delete to explicitly listed records.

SQL Server✓ Tested
PostgresBulk changes & set operations

Delete rows selected by a related table

Postgres: A correlated EXISTS limits the delete to explicitly listed records.

Postgres✓ Tested
SQLiteBulk changes & set operations

Delete rows selected by a related table

SQLite: A correlated EXISTS limits the delete to explicitly listed records.

SQLite✓ Tested
SQLRelationships & missing data

Find records without any related rows

SQL: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

SQL✓ Tested
SQL ServerRelationships & missing data

Find records without any related rows

SQL Server: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

SQL Server✓ Tested
PostgresRelationships & missing data

Find records without any related rows

Postgres: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

Postgres✓ Tested
SQLiteRelationships & missing data

Find records without any related rows

SQLite: NOT EXISTS avoids the NULL pitfalls of NOT IN when the subquery column can be missing.

SQLite✓ Tested
SQLJoins & subqueries

Find rows with a related record

Use EXISTS without duplicating the outer rows.

EXISTS✓ Tested
SQLGetting Started

Join related rows from two tables

SQL: Match a category key to its display label with an explicit join condition.

SQL✓ Tested
SQL ServerGetting Started

Join related rows from two tables

SQL Server: Match a category key to its display label with an explicit join condition.

SQL Server✓ Tested
PostgresGetting Started

Join related rows from two tables

Postgres: Match a category key to its display label with an explicit join condition.

Postgres✓ Tested