drop trigger if exists genio_before_delete; DELIMITER // create trigger genio_before_delete after delete on dbr_genio for each row begin delete from dbr_genio_bd where genio_id = old.id; END// DELIMITER ;