Ecco un esempio di trigger:
DELIMITER $$
CREATE TRIGGER tr_table1_del BEFORE DELETE ON table1 FOR EACH ROW
BEGIN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'DELETE cancelled';
END $$
DELIMITER ;
Ecco un esempio di trigger:
DELIMITER $$
CREATE TRIGGER tr_table1_del BEFORE DELETE ON table1 FOR EACH ROW
BEGIN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'DELETE cancelled';
END $$
DELIMITER ;