FIND YOUR NEXT FEW LINES

Results for “Relationships & missing data”

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

639 snippets foundClear filters
SQLGetting Started

Update one row using its primary key

SQL: Use a precise WHERE condition to change only the intended row in a scratch table.

SQL✓ Tested
SQL ServerGetting Started

Update one row using its primary key

SQL Server: Use a precise WHERE condition to change only the intended row in a scratch table.

SQL Server✓ Tested
SQLBulk changes & set operations

Update rows selected by a related table

SQL: Use EXISTS to limit updates based on an independent eligibility table.

SQL✓ Tested
SQL ServerBulk changes & set operations

Update rows selected by a related table

SQL Server: Use EXISTS to limit updates based on an independent eligibility table.

SQL Server✓ Tested
PostgresBulk changes & set operations

Update rows selected by a related table

Postgres: Use EXISTS to limit updates based on an independent eligibility table.

Postgres✓ Tested
SQLiteBulk changes & set operations

Update rows selected by a related table

SQLite: Use EXISTS to limit updates based on an independent eligibility table.

SQLite✓ Tested
SQLBulk changes & set operations

Update several classifications in one statement

SQL: A CASE expression computes the new value for each row covered by the update predicate.

SQL✓ Tested
SQL ServerBulk changes & set operations

Update several classifications in one statement

SQL Server: A CASE expression computes the new value for each row covered by the update predicate.

SQL Server✓ Tested
PostgresBulk changes & set operations

Update several classifications in one statement

Postgres: A CASE expression computes the new value for each row covered by the update predicate.

Postgres✓ Tested
SQLiteBulk changes & set operations

Update several classifications in one statement

SQLite: A CASE expression computes the new value for each row covered by the update predicate.

SQLite✓ Tested
SQL ServerTransactions & tables

Use a session-scoped temporary table

Store intermediate rows in a local # table.

temporary table✓ Tested
SQL ServerTransactions & tables

Use a small table variable

Declare rows for a short batch.

table variable✓ Tested