I want to set a trigger that effects only the row that is inserted, not the other rows.
So I need something different than for each row. Here is what I have now.
CREATE TRIGGER mytrigger BEFORE INSERT ON student
FOR EACH ROW SET @starost =new.starost+2;
You nearly had it:
It will add two to the
starostfield before insertion