FIND YOUR NEXT FEW LINES

Results for “null”

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

100 snippets foundClear filters
SQLConstraints & defaults

Apply a default when an insert omits a column

SQL: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.

SQL✓ Tested
SQL ServerConstraints & defaults

Apply a default when an insert omits a column

SQL Server: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.

SQL Server✓ Tested
PostgresConstraints & defaults

Apply a default when an insert omits a column

Postgres: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.

Postgres✓ Tested
SQLiteConstraints & defaults

Apply a default when an insert omits a column

SQLite: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.

SQLite✓ Tested
PowerShellHashtables & object records

Check for a hashtable key before reading it

PowerShell: ContainsKey distinguishes a missing key from a key whose value happens to be null.

PowerShell✓ Tested
CDynamic memory & ownership

Clear an owning pointer after releasing its allocation

C: Assigning NULL helps prevent accidental reuse through the same variable.

C✓ Tested
Arduino / CText & bounded buffers

Compare a command case-sensitively

Arduino / C: strcmp returns zero when both null-terminated strings match.

Arduino / C✓ Tested
CStrings & byte buffers

Compare two C strings for equality

C: strcmp returns zero only when both null-terminated byte strings are equal.

C✓ Tested
SQLReporting & grouped calculations

Compute an integer weighted average

SQL: Multiply before summing and guard a zero total weight with NULLIF.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Compute an integer weighted average

SQL Server: Multiply before summing and guard a zero total weight with NULLIF.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Compute an integer weighted average

Postgres: Multiply before summing and guard a zero total weight with NULLIF.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Compute an integer weighted average

SQLite: Multiply before summing and guard a zero total weight with NULLIF.

SQLite✓ Tested