Using Aggregate Functions Inside a Trigger In MySQL

by Ranganathan 2012-06-01 18:30:11

<font size=5>
delimiter |
CREATE TRIGGER checkAge BEFORE INSERT ON People
FOR EACH ROW BEGIN
IF AVG(age) > 50 THEN
SET NEW.age = 20;
END IF;
END
|
delimiter ;

</font>
1041
like
0
dislike
0
mail
flag

You must LOGIN to add comments