SQLite Forum

3.31.1: create table with multiple primary key columns
Login
Au contraire, there is a way to add a child without a current parent: add DEFERRABLE INITIALLY DEFERRED to the column definition:
``` SQL
create table list (row_id INTEGER PRIMARY KEY, item TEXT UNIQUE,
     prev INTEGER REFERENCES list(row_id) DEFERRABLE INITIALLY DEFERRED);
...
begin transaction;
insert into list _child_;
insert into list _parent_;
commit transaction;
```