title: H2 - How to create a database trigger that log a row change to another table?
body: <p>How to create a database trigger that log a row change to another table in H2?</p>
  
  <p>In MySQL, this can be done easily:</p>
  
  <pre><code>CREATE TRIGGER `trigger` BEFORE UPDATE ON `table`
    FOR EACH ROW BEGIN
      INSERT INTO `log`
      (
        `field1`
        `field2`,
        ...
      )
      VALUES
      (
        NEW.`field1`,
        NEW.`field2`,
        ...
      ) ;
      END;
  </code></pre>