Results for “if”
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
Use a session-scoped temporary table
Store intermediate rows in a local # table.
temporary table✓ Tested
Use a small table variable
Declare rows for a short batch.
table variable✓ Tested
Use case-insensitive dictionary keys
C#: Choose an ordinal comparer when case-insensitive keys represent identifiers.
C#✓ Tested
Use headings to show document structure
HTML: Learn how to use headings to show document structure in a complete browser example.
HTML✓ Tested
Use semantic page landmarks
HTML: Learn how to use semantic page landmarks in a complete browser example.
HTML✓ Tested
Validate a complete numeric serial command
Arduino / C: Check for digits, an end pointer, and an application-specific range.
Arduino / C✓ Tested
Validate an argument at a method boundary
C#: ThrowIfNegative gives callers an explicit argument error for an invalid range.
C#✓ Tested