title: Create Update Trigger To Copy Changed Data In MySQL Syntax Error
body: <pre><code>CREATE TRIGGER backupFIDE AFTER UPDATE ON player
  FOR EACH ROW
  BEGIN
  IF (OLD.FIDERating &lt;&gt; NEW.FIDERating) THEN
  INSERT INTO playerbackup(PlayerName, OldFIDERating, NewFIDERating)
  VALUES(OLD.PlayerName, OLD.FIDERating, NEW.NewFIDERating)
  END;
  </code></pre>
  
  <p>Hi guys, receiving syntax error at line 6 for some reason, been looking online for solution to what might be the cause. Basically looking a simple trigger, that will copy a change change of FIDERating in Player table to a backup table containing OldFIDERating before it was changed, and the NewFIDERating along with the date change was made. </p>