title: Error adding update trigger to select columns in a table
body: <p>I am trying to add a trigger, when a table is updated (except for two columns in that table), it updates another table. The query I used is given below:</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE TRIGGER my_trigger
  BEFORE UPDATE ON town_1a2b3c4d
  BEGIN
      IF NOT UPDATE (is_killed) AND NOT UPDATE (is_executed)
          BEGIN
              UPDATE town_details SET game_index = game_index + 1 WHERE town_id = '1a2b3c4d';
          END;
  END;
  </code></pre>
  
  <p>But it gives me this error:</p>
  
  <p><strong>MySQL said</strong></p>
  
  <blockquote>
    <p>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BEGIN
        IF NOT UPDATE (is_killed) AND NOT UPDATE (is_executed)
            BEGIN...' at line 3</p>
  </blockquote>