title: Two MySQL timestamp columns in one table
body: <p>I would like to create a table that has both a column for "created" and another for "updated". The column "created" will be set at insert and never change. The column "updated" will change every time a row is updated. I don't want to mess with either of these columns in the subsequent INSERT or UPDATE statements. So what should my CREATE TABLE statement look like if I start with something like this?</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `mydb`.`mytable` (
    `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    `updated` TIMESTAMP,
    `created` TIMESTAMP,
    `deleted` TINYINT DEFAULT 0,
    `notes` TEXT DEFAULT '',
    `description` VARCHAR(100)
  ) TYPE=innodb;
  </code></pre>
  
  <p>I seem to be having trouble creating a table with two TIMESTAMP columns. I don't care if the columns are TIMESTAMP or DATETIME or whatever, I just want them to be populated by MySQL without explicit instructions from the insert or update statements.</p>
  
  <p>I would like to be able to do inserts like this:</p>
  
  <pre><code>INSERT INTO `mydb`.`mytable` (notes,description) VALUES ('some note','some description');
  </code></pre>
  
  <p>and updates like this:</p>
  
  <pre><code>UPDATE `mydb`.`mytable` SET notes=CONCAT(notes,'some more notes') WHERE id=1;
  </code></pre>
  
  <p>both without having to explicitly set the "created" column or set (or reset) the "updated" column in the insert or update statement.</p>