drop trigger if exists pquote_before_delete; DELIMITER // create trigger pquote_before_delete after delete on dbr_pquote for each row begin delete from dbr_pquote_bd where pquote_id = old.id; END// DELIMITER ;