title: What is the difference between "referencing old" & "referencing new" in a SQL stored procedure?
body: <p>I'm not sure if this syntax is Informix-specific, but I was having trouble creating a trigger until I found some syntax that included one, or both, of these lines:</p>
  
  <pre><code>CREATE TRIGGER      accuplacer_trig
  UPDATE OF           processed
  ON                  accuplacer_rec
  REFERENCING OLD AS  proc_pre_upd 
  FOR EACH ROW        (EXECUTE PROCEDURE accuplacer_proc(proc_pre_upd.exam_num));
  </code></pre>
  
  <p>Sometimes it's written as <code>REFERENCING OLD AS alias1, NEW AS alias2</code></p>
  
  <p>What is the difference between <code>REFERENCING OLD AS</code> and <code>REFERENCING NEW AS</code>, and what do they do/why are they needed?</p>