title: MySQL Trigger for Aging
body: <p>I'm trying to create a trigger that will automatically increase the year column by 1 when the month column is 12, and then empty the month column.
  But I don't understand triggers that well and I'm confusing myself in my attempts, so I was hoping someone could look over this code to see if it would work or suggest improvements:</p>
  
  <pre><code>CREATE TRIGGER aging BEFORE UPDATE ON dogs
  FOR EACH ROW
  DELETE FROM dogs WHERE month = 12;
  UPDATE year SET year = year+1;
  </code></pre>
  
  <p>Thanks!</p>