I have two tables Client , Commande
The DDL in sqlite3 is the following ,
CREATE TABLE Client ( id_client INT NOT NULL, nom varchar(10), PRIMARY KEY ( id_client ) ); CREATE TABLE Commande ( id_commande INT NOT NULL, id_client INTEGER REFERENCES Client ( id_client ) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY ( id_commande ) );
i use TzTable1 for Client and TzTable2 for Commande
So, When I delete a client from Client table by calling Tztable1.delete ;
, it doesn't delete associated Commandes from Commande Table !!
i dont know where the problem is !!