title: Update one column as sum of other two columns
body: <p><em>I need to update each row of a table with one column as sum of other two columns in the same table</em> </p>
  
  <p><strong>Something like this</strong> </p>
  
  <blockquote>
    <p>UPDATE table1 SET table1.column1 = sum (table1.column1 +
    table1.column2) for every row</p>
  </blockquote>
  
  <p><strong>I have tried</strong> </p>
  
  <p><code>This is working for me</code></p>
  
  <pre><code>UPDATE table1 SET column1 =(SELECT  SUM(column1 + column2)  FROM table1 where rowid = 1) WHERE rowid = 1
  </code></pre>
  
  <p>So I can do this by iterating each rowid by first selecting all rowId </p>
  
  <pre><code>for( all rowid as i){
      UPDATE table1 SET column1 =(SELECT  SUM(column1 + column2)  FROM table1 where rowid = i) WHERE rowid = i
      }
  </code></pre>
  
  <p><strong>But I need to do for all the rows in that table in one query</strong> </p>
  
  <p><em>When I tried:</em></p>
  
  <pre><code>update table1  set column1  = (select (column1  + column2) from table1 )
  </code></pre>
  
  <p><em>this will summ all the values of column1 and column2
  i want to do wrt to a row</em></p>
  
  <p>Any idea? </p>
  
  <p>Me working in <strong>sqLite</strong> for Android </p>