title: UPDATE SET values from list
body: <p>I have a problem updating a table with new values from a list.</p>
  
  <p>My data looks like this:</p>
  
  <pre><code>id  value_1  value_2
  
  1   11       21
  
  2   32       41
  
  3   43       84
  
  ... 
  </code></pre>
  
  <p>I already wrote the column id and value_1 with an INSERT command in the table. At that step, I cannot write the value_2 column as I still need to calculate it, so I want to update the table later with an array of values of the value_2 column.</p>
  
  <p>I would like to have a code something like this:</p>
  
  <pre><code>UPDATE table_name SET value_2 = (21,41,84) WHERE id IN (1,2,3)
  </code></pre>
  
  <p>Unfortunately, it's not possible like this to SET value_2 from a list, it works only with single values.</p>
  
  <p>I got a workaround with writing a for loop over the whole UPDATE query, but this was too slow for my program.
  Anyone has a suggestion how I could get this working?</p>
  
  <p>The whole query is performed with Python.</p>