Results for “Ordering & set operations”
Small, practical examples. Search by task or narrow things down below.
Update rows selected by a related table
SQL Server: Use EXISTS to limit updates based on an independent eligibility table.
SQL Server✓ Tested
Update rows selected by a related table
Postgres: Use EXISTS to limit updates based on an independent eligibility table.
Postgres✓ Tested
Update rows selected by a related table
SQLite: Use EXISTS to limit updates based on an independent eligibility table.
SQLite✓ Tested
Update several classifications in one statement
SQL: A CASE expression computes the new value for each row covered by the update predicate.
SQL✓ Tested
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
Update several classifications in one statement
Postgres: A CASE expression computes the new value for each row covered by the update predicate.
Postgres✓ Tested
Update several classifications in one statement
SQLite: A CASE expression computes the new value for each row covered by the update predicate.
SQLite✓ Tested
Store and inspect a fixed set of bits
C++: bitset offers named operations and a readable binary representation.
C++✓ Tested
Assign a default to an empty or unset variable
Bash Scripts: The colon-equals expansion both supplies and assigns a fallback value.
Bash Scripts✓ Tested
Average a fixed set of readings
Accumulate sample values without overflowing a 16-bit total.
array✓ Tested
Chain operations that may return None
Chain operations that may return None in a complete Rust program using the standard library.
Rust✓ Tested
Check whether a variable exists under nounset
Bash Scripts: The plus expansion distinguishes an unset variable without reading its missing value.
Bash Scripts✓ Tested