title: How to add column to a table based on another columns value in SQL
body: <p>I have a table in the database which looks like this:</p>
  
  <pre><code>#table_tstamp
  id, tstamp
  1, 12.11
  2, 14.0
  3, 18.22
  4, 24.34
  </code></pre>
  
  <p>I want to another column to this table, and iterate over the values in tstamp such that new value= {tstamp(i)*2+5} such that the updated table would look like</p>
  
  <pre><code>#table_tstamp
  id, tstamp, ts_new
  1, 12.11, 29.22
  2, 14.0 , 33.0
  3, 18.22, 41.44
  4, 24.34, 53.68
  </code></pre>
  
  <p>I tried this code but didn't work for me(though the column fetch_ts got created, but has NULL values):</p>
  
  <pre><code>ALTER TABLE table_tstamp
  ADD fetch_ts float; 
  
  insert into table_tstamp 
     SELECT 2*t2.tstamp+5 FROM table_tstamp t2;
  
  #1136 - Column count doesn't match value count at row 1
  </code></pre>