Results for “foreign keys”
Small, practical examples. Search by task or narrow things down below.
Block deletion of a referenced parent
SQL: The default foreign-key action prevents deletion while a child still refers to the parent.
SQL✓ Tested
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
Block deletion of a referenced parent
Postgres: The default foreign-key action prevents deletion while a child still refers to the parent.
Postgres✓ Tested
Block deletion of a referenced parent
SQLite: The default foreign-key action prevents deletion while a child still refers to the parent.
SQLite✓ Tested
Expand a JSON array into rows
Iterate array elements using a table-valued function.
json_each✓ Tested
Group strings by their length
Java: Choose a TreeMap supplier when group keys must have deterministic order.
Java✓ 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
Join through a lookup table
SQL: Use explicit aliases and join keys when enriching records through two relationships.
SQL✓ Tested
Join through a lookup table
SQL Server: Use explicit aliases and join keys when enriching records through two relationships.
SQL Server✓ Tested
Join through a lookup table
Postgres: Use explicit aliases and join keys when enriching records through two relationships.
Postgres✓ Tested
Join through a lookup table
SQLite: Use explicit aliases and join keys when enriching records through two relationships.
SQLite✓ Tested