with the use of on delete cascade clause
when we deete the parent record child record will be deleted automaticaly
Login to rate this answer.
ON DELETE CASCADE clause with a FOREIGN KEY constraint specifies that when a row in the parent table is deleted, any matching rows in the child table are also deleted.

1 User has rated as useful.
Login to rate this answer.
You may also use triggers for this purpose. But specifying on delete cascade while defining foreign key constraint is better option.
Login to rate this answer.
1> always avoid select * from
2> do not use in operator
Login to rate this answer.