Voici un exemple de déclencheur :
DELIMITER $$
CREATE TRIGGER tr_table1_del BEFORE DELETE ON table1 FOR EACH ROW
BEGIN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'DELETE cancelled';
END $$
DELIMITER ;
Voici un exemple de déclencheur :
DELIMITER $$
CREATE TRIGGER tr_table1_del BEFORE DELETE ON table1 FOR EACH ROW
BEGIN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'DELETE cancelled';
END $$
DELIMITER ;