ALTER TABLE `update_log` ADD `user` VARCHAR( 200 ) NOT NULL 

DROP TRIGGER IF EXISTS `update_durchfaller`;

delimiter |


CREATE TRIGGER update_durchfaller
AFTER UPDATE ON stud
FOR EACH ROW BEGIN
  INSERT INTO update_log (uid, old, new, date, user) VALUES (NEW.uid, OLD.durchgefallen, NEW.durchgefallen,now(), user());
  DELETE FROM update_log WHERE new=old;
END;
|
delimiter ;