SQLite Forum

3.31.1: create table with multiple primary key columns
Login
A column x which is declared to be domain constrained to a value in a parent table column (ie, has a _references table(column)_) may contain a null value and pass the foreign key constraint even though the parent table does not contain a null in the referenced column, hence the _on delete set null_ constraint which means that if the parent is deleted set the value to null, which means no parent row.  Were this not the case then there would be no way to add a child that does not currently have a parent.