title: Update row in a table based on a column in the same table
body: <p>How can I update rows in a table based on values in a column in the same table?</p>
  
  <p>TableA:</p>
  
  <pre><code> col1 col2 col3 total col_num
   NULL NULL NULL 100   1
   NULL NULL NULL 200   2
   NULL NULL NULL 300   3
  </code></pre>
  
  <p>Result after update:</p>
  
  <p>TableA:</p>
  
  <pre><code>col1  col2  col3 total col_num
  100   NULL  NULL 100   1
  NULL  200   NULL 200   2
  NULL  NULL  300  300   3
  </code></pre>