title: Update Field When Not Null
body: <p>I have an update statement that updates fields x, y and z where id = xx.</p>
  
  <p>In the table I have a few different x_created_datetime fields (for different portions of the record that are maintained/entered by different folks). I'd like to write a single query that will update this field if is null, but leave it alone if is not null.</p>
  
  <p>So what I have is:</p>
  
  <pre><code>UPDATE newspapers
  SET scan_notes = "data",
      scan_entered_by = "some_name",
      scan_modified_date = "current_unix_timestamp"
  WHERE id = X
  </code></pre>
  
  <p>What I need is a way to add in the following, but still always update the above:</p>
  
  <pre><code>scan_created_date = "current_unix_timestamp"
  where scan_created_date is null
  </code></pre>
  
  <p>I'm hoping I can do this without a second transaction to the DB. Any ideas on how to accomplish this?</p>