title: SQL Update table cell based on same tabel cell in another table
body: <p>I know this question have been asked before, My previous similar question was dismissed cause there already is several like this.. but i just dont get this to work...</p>
  
  <p>Ive tried this (in PHPmyAdmin) to update cell24 with value from table2 to table1</p>
  
  <pre><code>UPDATE name_table1 A
  SET 'A.cell24' FROM 'B.cell24'
  FROM name_table2 B
  WHERE A.id = B.id
  AND A.cell24 = NULL
  </code></pre>
  
  <p>But this cause "#1064 - You have an error in your SQL syntax;....."</p>
  
  <p>And ive tried this:</p>
  
  <pre><code>UPDATE name_table1  A
  SET A.cell24 = ( SELECT B.cell24
                   FROM name_table2 B )
  </code></pre>
  
  <p>And this works BUT it removes all values in the cell24 on other id's thats not supposed to be updated. Only the cell24 with equal id in both tables was correct updated. Rest was left blank</p>
  
  <pre><code>UPDATE name_table1 A
  SET A.cell24 = ( SELECT B.cell24
                   FROM name_table2 B
                  WHERE A.id = B.id AND A.cell24 = NULL ) 
  </code></pre>
  
  <p>This caused all cell24 in table1 to be blank</p>
  
  <p>Please help :P</p>
  
  <p>(i would also need to know how i make this update with more cells in one query, ex i need to update cell24, cell25, cell26 IF the cell is empty (NULL) )</p>