FIND YOUR NEXT FEW LINES

Results for “key”

Small, practical examples. Search by task or narrow things down below.

160 snippets foundClear filters
SQL ServerConstraints & defaults

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
PostgresConstraints & defaults

Make a pair of columns unique together

Postgres: A composite primary key permits repeated individual values while forbidding a duplicate combination.

Postgres✓ Tested
SQLiteConstraints & defaults

Make a pair of columns unique together

SQLite: A composite primary key permits repeated individual values while forbidding a duplicate combination.

SQLite✓ Tested
SQLConstraints & defaults

Reference a parent identified by two columns

SQL: A composite foreign key checks the complete referenced key rather than either column independently.

SQL✓ Tested
SQL ServerConstraints & defaults

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
PostgresConstraints & defaults

Reference a parent identified by two columns

Postgres: A composite foreign key checks the complete referenced key rather than either column independently.

Postgres✓ Tested
SQLiteConstraints & defaults

Reference a parent identified by two columns

SQLite: A composite foreign key checks the complete referenced key rather than either column independently.

SQLite✓ Tested
C++Containers & compound values

Remove a map entry and inspect the number removed

C++: erase by key reports whether a unique-key map contained the entry.

C++✓ Tested
PythonCollections

Sort dictionaries by a value

Sort a list of dictionaries by a numeric field, leaving the original list unchanged.

sort✓ Tested
C++Ordering & set operations

Sort records by two fields

C++: Tuple comparison implements lexicographic ordering across several keys.

C++✓ Tested
TypeScriptCollections & records

Type a dictionary with Record

Limit a lookup table to a known set of keys.

Record✓ Tested
C#Collections & data structures

Add a dictionary entry only if absent

C#: TryAdd reports a duplicate key without replacing its existing value.

C#✓ Tested