Results for “unique”
Small, practical examples. Search by task or narrow things down below.
Collect unique sorted values
Collect unique sorted values in a complete Rust program using the standard library.
Rust✓ Tested
Count commits unique to each of two branches
Git: The symmetric difference with left-right separates commits reachable from only one side.
Git✓ Tested
Enforce uniqueness with a dedicated index
SQL: A unique index rejects a duplicate combination independently of query plans.
SQL✓ Tested
Enforce uniqueness with a dedicated index
SQL Server: A unique index rejects a duplicate combination independently of query plans.
SQL Server✓ Tested
Enforce uniqueness with a dedicated index
Postgres: A unique index rejects a duplicate combination independently of query plans.
Postgres✓ Tested
Enforce uniqueness with a dedicated index
SQLite: A unique index rejects a duplicate combination independently of query plans.
SQLite✓ Tested
Find lines unique to the first sorted file
Linux Commands: Use comm -23 to retain only records absent from the second input.
Linux Commands✓ Tested
Index records by a unique key
Java: Use toMap with an explicit merge rule so duplicate keys have defined behavior.
Java✓ Tested
Invert a dictionary with unique values
Python: Swap keys and values when the values are hashable and unique.
Python✓ 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