Results for “columns”
Small, practical examples. Search by task or narrow things down below.
Treat an empty trimmed value as missing
Postgres: NULLIF converts an empty string to NULL before a fallback is applied.
Postgres✓ Tested
Treat an empty trimmed value as missing
SQLite: NULLIF converts an empty string to NULL before a fallback is applied.
SQLite✓ Tested
Turn a condition into a result label
SQL: Use CASE to describe stock availability for each row.
SQL✓ Tested
Turn a condition into a result label
SQL Server: Use CASE to describe stock availability for each row.
SQL Server✓ Tested
Turn a condition into a result label
Postgres: Use CASE to describe stock availability for each row.
Postgres✓ Tested
Turn a condition into a result label
SQLite: Use CASE to describe stock availability for each row.
SQLite✓ Tested
Turn JSON into typed rows
Project JSON array items into SQL columns.
OPENJSON✓ Tested
Undo a multi-row transfer atomically
SQL: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.
SQL✓ Tested
Undo a multi-row transfer atomically
SQL Server: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.
SQL Server✓ Tested
Undo a multi-row transfer atomically
Postgres: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.
Postgres✓ Tested
Undo a multi-row transfer atomically
SQLite: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.
SQLite✓ Tested
Undo only the work after a savepoint
SQL: After committing the fixtures, roll back a trial change while keeping earlier work in the second transaction.
SQL✓ Tested