title: How to populate empty columns in all rows with a value from another row
body: <p>I have this table:</p>
  
  <pre><code>num | id | value1 | value2 | ..... | valueN
  ____|____|________|________|_______|_______
   1  |  1 |  val1  | val2   | ..... | valN
   2  |  1 |  blah  | NULL   | ..... | NULL
   1  |  2 | val12  | val22  | ..... | valN2
   2  |  2 | blah2  | NULL   | ..... | NULL
  </code></pre>
  
  <p><code>num</code> and <code>id</code> are a primary key. Each row that has 1 <code>num</code> is the row that has all the columns filled, all other rows for that <code>id</code> (where <code>num</code> is higher than 1) have empty columns which I want to fill with corresponding values from columns in the <code>num</code>=1 with the same <code>id</code>.</p>
  
  <p>I could write a script that runs on all <code>num</code> >1 rows and and then runs on <em>every</em> empty column and brings it from the <code>num</code>=1 row, but is there a more SQLy way to do it? Something more general, without iterating every column?</p>