i have code for database for subject and commands table
i want sql statement if i am want to delete subject directly delete all commands for this subject. my database is
create table if not exists subject(
S_Id INT(100) not null AUTO_INCREMENT,
FirstName varchar(255) not null,
title text not null,
PRIMARY KEY (S_Id)
);
create table if not exists comm(
C_Id int not null AUTO_INCREMENT,
message text not null,
S_Id int not null,
PRIMARY KEY (C_Id),
FOREIGN KEY (S_Id) REFERENCES Persons(S_Id)
);
thanks all ...