Results for “key”
Small, practical examples. Search by task or narrow things down below.
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
Reference a parent identified by two columns
SQL: A composite foreign key checks the complete referenced key rather than either column independently.
SQL✓ Tested
Reference a parent identified by two columns
SQL Server: A composite foreign key checks the complete referenced key rather than either column independently.
SQL Server✓ Tested
Reference a parent identified by two columns
Postgres: A composite foreign key checks the complete referenced key rather than either column independently.
Postgres✓ Tested
Reference a parent identified by two columns
SQLite: A composite foreign key checks the complete referenced key rather than either column independently.
SQLite✓ Tested
Remove a map entry and inspect the number removed
C++: erase by key reports whether a unique-key map contained the entry.
C++✓ Tested
Sort dictionaries by a value
Sort a list of dictionaries by a numeric field, leaving the original list unchanged.
sort✓ Tested
Sort records by two fields
C++: Tuple comparison implements lexicographic ordering across several keys.
C++✓ Tested
Type a dictionary with Record
Limit a lookup table to a known set of keys.
Record✓ Tested
Add a dictionary entry only if absent
C#: TryAdd reports a duplicate key without replacing its existing value.
C#✓ Tested