Results for “null”
Small, practical examples. Search by task or narrow things down below.
Include zero counts for missing relationships
Postgres: Count the non-null child key after a left join so a missing relationship produces zero.
Postgres✓ Tested
Include zero counts for missing relationships
SQLite: Count the non-null child key after a left join so a missing relationship produces zero.
SQLite✓ Tested
Join values with a delimiter
Concatenate rows in a specified order.
group_concat✓ Tested
Keep unmatched rows with LEFT JOIN
Show every product even when stock is missing.
LEFT JOIN✓ Tested
Measure a string length
Count bytes before the null terminator with C strlen.
C✓ Tested
Read a nested value safely
Combine optional chaining with nullish coalescing in JavaScript.
JavaScript✓ Tested
Read a variant only when it holds the expected type
C++: get_if returns a null pointer rather than throwing for another active alternative.
C++✓ Tested
Read serial text up to a delimiter
Arduino / C: readBytesUntil excludes the delimiter and does not add a null terminator.
Arduino / C✓ Tested
Reject a negative quantity with CHECK
SQL: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
SQL✓ Tested
Reject a negative quantity with CHECK
SQL Server: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
SQL Server✓ Tested
Reject a negative quantity with CHECK
Postgres: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
Postgres✓ Tested
Reject a negative quantity with CHECK
SQLite: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
SQLite✓ Tested