title: MySQL - Multiple column UPDATE statement using IF statements
body: <p>The goal is to link table 1 to table 2 and populate table 1 when table 1 is not the default value. </p>
  
  <p>Example:</p>
  
  <pre><code>UPDATE table1 aa, table2 bb
  SET aa.column2=IF(aa.column2=0,bb.column2,aa.column2) and aa.column3=IF(aa.column3=0,bb.column3,aa.column3)... Total of 5 columns being updated
  WHERE aa.column1=bb.column1;
  </code></pre>
  
  <p>When running this I receive poor population.  However, if I remove all but one IF statement from the SET line everything works as intended.</p>
  
  <p>I'm rather new to MySQL so any help that anyone could provide would be greatly appreciate. </p>