Results for “columns”
Small, practical examples. Search by task or narrow things down below.
Keep unmatched rows with LEFT JOIN
Show every product even when stock is missing.
LEFT JOIN✓ Tested
Label rows with CASE
Derive a readable label from a condition.
CASE✓ Tested
List distinct values
Remove duplicate category values from a result.
DISTINCT✓ Tested
List unordered pairs without duplicate reversals
SQL: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
SQL✓ Tested
List unordered pairs without duplicate reversals
SQL Server: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
SQL Server✓ Tested
List unordered pairs without duplicate reversals
Postgres: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
Postgres✓ Tested
List unordered pairs without duplicate reversals
SQLite: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
SQLite✓ Tested
Match a known text prefix
SQL: A percent wildcard matches zero or more characters following the prefix.
SQL✓ Tested
Match a known text prefix
SQL Server: A percent wildcard matches zero or more characters following the prefix.
SQL Server✓ Tested
Match a known text prefix
Postgres: A percent wildcard matches zero or more characters following the prefix.
Postgres✓ Tested
Match a known text prefix
SQLite: A percent wildcard matches zero or more characters following the prefix.
SQLite✓ Tested
Match a text prefix
SQL: Use a percent wildcard after a known prefix.
SQL✓ Tested