Foreign Key constraint doesn't work
问题 I have two tables, theme and quiz , here is their definition: CREATE TABLE "theme" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , "nom" VARCHAR NOT NULL ); CREATE TABLE quiz( id INTEGER PRIMARY KEY, nom VARCHAR(256) NOT NULL, theme INTEGER NOT NULL, niveau INTEGER NOT NULL, pass INTEGER DEFAULT 1 NOT NULL, jok INTEGER DEFAULT 1 NOT NULL, etat INTEGER DEFAULT 0 NOT NULL, FOREIGN KEY (theme) REFERENCES theme(id) ); The field id (the primary key) in the table theme is a Foreign Key in the