title: Need a datetime column in SQL Server that automatically updates when the record is modified
body: <p>I need to create a new <code>DATETIME</code> column in SQL Server that will always contain the date of when the record was created, and then it needs to automatically update whenever the record is modified. I've heard people say I need a trigger, which is fine, but I don't know how to write it. Could somebody help with the syntax for a trigger to accomplish this?</p>
  <p>In MySQL terms, it should do exactly the same as this MySQL statement:</p>
  <pre><code>ADD `modstamp` timestamp NULL 
      DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
  </code></pre>
  <p>Here are a few requirements:</p>
  <ul>
  <li>I can't alter my <code>UPDATE</code> statements to set the field when the row is modified, because I don't control the application logic that writes to the records.</li>
  <li>Ideally, I would not need to know the names of any other columns in the table (such as the primary key)</li>
  <li>It should be short and efficient, because it will happen very often.</li>
  </ul>