FIND YOUR NEXT FEW LINES

Results for “foreign keys”

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

56 snippets foundClear filters
SQLConstraints & defaults

Block deletion of a referenced parent

SQL: The default foreign-key action prevents deletion while a child still refers to the parent.

SQL✓ Tested
SQL ServerConstraints & defaults

Block deletion of a referenced parent

SQL Server: The default foreign-key action prevents deletion while a child still refers to the parent.

SQL Server✓ Tested
PostgresConstraints & defaults

Block deletion of a referenced parent

Postgres: The default foreign-key action prevents deletion while a child still refers to the parent.

Postgres✓ Tested
SQLiteConstraints & defaults

Block deletion of a referenced parent

SQLite: The default foreign-key action prevents deletion while a child still refers to the parent.

SQLite✓ Tested
SQLiteJSON data

Expand a JSON array into rows

Iterate array elements using a table-valued function.

json_each✓ Tested
JavaStream transformations

Group strings by their length

Java: Choose a TreeMap supplier when group keys must have deterministic order.

Java✓ Tested
JavaStream transformations

Index records by a unique key

Java: Use toMap with an explicit merge rule so duplicate keys have defined behavior.

Java✓ Tested
PythonMappings & sets

Invert a dictionary with unique values

Python: Swap keys and values when the values are hashable and unique.

Python✓ Tested
SQLRelationships & missing data

Join through a lookup table

SQL: Use explicit aliases and join keys when enriching records through two relationships.

SQL✓ Tested
SQL ServerRelationships & missing data

Join through a lookup table

SQL Server: Use explicit aliases and join keys when enriching records through two relationships.

SQL Server✓ Tested
PostgresRelationships & missing data

Join through a lookup table

Postgres: Use explicit aliases and join keys when enriching records through two relationships.

Postgres✓ Tested
SQLiteRelationships & missing data

Join through a lookup table

SQLite: Use explicit aliases and join keys when enriching records through two relationships.

SQLite✓ Tested