Results for “Structured data & serialization”
Small, practical examples. Search by task or narrow things down below.
Keep rows matching a condition
SQL: Use WHERE to select rows with a particular category.
SQL✓ Tested
Keep rows matching a condition
SQL Server: Use WHERE to select rows with a particular category.
SQL Server✓ Tested
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
Limit a value to a safe interval
Clamp an integer between chosen endpoints.
constrain✓ Tested
List distinct values
Remove duplicate category values from a result.
DISTINCT✓ Tested
Make a pair of columns unique together
SQL: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQL✓ Tested
Make a pair of columns unique together
SQL Server: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQL Server✓ Tested
Make a pair of columns unique together
Postgres: A composite primary key permits repeated individual values while forbidding a duplicate combination.
Postgres✓ Tested
Make a pair of columns unique together
SQLite: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQLite✓ Tested
Map an input range to an output range
Scale an integer reading to a different interval.
map✓ Tested
Mark a longer quotation and its source
HTML: Blockquote marks quoted content; a visible source link remains useful because cite is metadata.
HTML✓ Tested