mysql trigger

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
gd77
Forum Newbie
Posts: 20
Joined: Sat Feb 26, 2011 6:11 pm

mysql trigger

Post by gd77 »

delimiter //
CREATE TRIGGER `tblcon` AFTER INSERT ON `tbl_x`
FOR EACH ROW
BEGIN
INSERT INTO `tbl_y` (`id_title`) VALUES (NEW.id);
INSERT INTO `tbl_z` (`id_title`) VALUES (NEW.id);
END;
delimiter ;


the insert working for the first table 'y' not the second 'z'
Post Reply