Results for “Arrays & embedded state”
Small, practical examples. Search by task or narrow things down below.
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
Locate a value in a sorted array
Java: Use Arrays.binarySearch only after establishing ascending order.
Java✓ Tested
Look up values in an associative array
Use named keys for a small in-memory configuration table.
dictionary✓ 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
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