Results for “ROW_NUMBER”
Small, practical examples. Search by task or narrow things down below.
Update one row using its primary key
SQLite: Use a precise WHERE condition to change only the intended row in a scratch table.
SQLite✓ Tested
Update rows selected by a related table
SQL: Use EXISTS to limit updates based on an independent eligibility table.
SQL✓ Tested
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
Validate the number of positional arguments
Bash Scripts: Use the argument count to enforce a simple command-line contract.
Bash Scripts✓ Tested
Wrap a row of items
Allow CSS flex items to wrap when a row runs out of space.
CSS✓ Tested
Calculate a page count with ceiling division
JavaScript: Use Math.ceil for a nonnegative item count and a positive page size.
JavaScript✓ Tested
Calculate a page count with ceiling division
TypeScript: Use Math.ceil for a nonnegative item count and a positive page size.
TypeScript✓ Tested
Calculate an integer beyond the 64-bit range
C#: Use BigInteger for arbitrary-precision integer arithmetic.
C#✓ Tested
Calculate with exact rational values
Python: Use Fraction for exact ratios rather than binary floating-point approximations.
Python✓ Tested
Check whether a floating-point value is finite
Check whether a floating-point value is finite in a complete Rust program using the standard library.
Rust✓ Tested