title: updating one row with current timestamp based on it's id
body: <p>I have a table like so:</p>
  
  <pre><code>id | date    | date2
  3  |2019-1-6| NULL
  2  |2019-1-5| NULL
  1  |2019-1-2| NULL
  </code></pre>
  
  <p>I want my query to update <code>date2</code> only for the newest id:</p>
  
  <pre><code>id | date    | date2
  3  |2019-1-6 | 2019-1-7
  2  |2019-1-5 | NULL
  1  |2019-1-2 | NULL
  </code></pre>
  
  <p>I tried this but it won't let me use select clause in where while using an update query.</p>
  
  <pre><code>update table set data2=current_timestamp where id=(select max(id) from table)
  </code></pre>