Tuesday, December 6, 2011

Creating after insert trigger in my sql


Creating after insert  trigger for table b  after inserting values in table a


DELIMITER $$

CREATE TRIGGER b_Trigger
     AFTER insert ON a
     FOR EACH ROW
     BEGIN
     insert into b(`my_name`) values(new.name);
END;
$$
DELIMITER ;

No comments:

Post a Comment