there are two tables
create table A(
id integer primary key autoincrement,
subject text not null,
);
create table B(
id integer primary key autoincrement,
text integer references A(id)
on delete restrict
deferrable initially deferred
unique
);
B table row should be linked to A.
So, I added B.text with a foreign key to A..
I added few random data with pk values 1 and 2 in table A
Now, I tried to create B table data with a text value referring to 5 which is not present in A but it still could store..
Why this is working and how to fix it?