{ Berbagi, Menulis, Dan Mengajar } Ilmu… » 7. Operating System » Trigger DELETE DATA
Trigger DELETE DATA
DELIMITER $$
USE `sms2`$$
DROP TRIGGER /*!50032 IF EXISTS */ `DeletePbk`$$
CREATE
/*!50017 DEFINER = ‘dimas’@’%’ */
TRIGGER `DeletePbk` AFTER DELETE ON `pbk`
FOR EACH ROW BEGIN
DELETE FROM pbk_copy WHERE pbk_copy.id_pbk=OLD.id_pbk;
END;
$$
DELIMITER ;
Filed under: 7. Operating System