title: How to create trigger in informix?
body: <p>I am trying to write a trigger like in the following simplified example:</p>
  
  <pre><code>create trigger adr_trg update of fname, lname on adr
  REFERENCING OLD AS o NEW AS n
  FOR EACH ROW
  (
    IF o.fname &lt;&gt; n.fname THEN
      insert into adrlog (old_value, new_value)
      values (o.fname, n.fname);
    END IF;
  
    IF o.lname &lt;&gt; n.lname THEN
      insert into adrlog (old_value, new_value)
      values (o.lname, n.lname);
    END IF;
  )
  </code></pre>
  
  <p>This fails!</p>
  
  <p>Only this works:</p>
  
  <pre><code>create trigger adr_trg update of fname, lname on adr
  REFERENCING OLD AS o NEW AS n
  FOR EACH ROW
  (
      insert into adrlog (old_value, new_value)
      values (o.fname, n.fname);
  )
  </code></pre>
  
  <p>What am I doing wrong?</p>