title: Converting INSERT commands to UPDATE
body: <p>I have two <code>INSERT</code> commands, that are useless to me like that because the two sets of rows - the ones that are already in the table, and the ones I have as <code>INSERT</code> commands - are not disjunct. Both commands insert lots of rows, and lots of values.</p>
  
  <p>Therefore I get the duplicate entry error if I want to execute those lines.</p>
  
  <p>Is there any easy way to 'convert' those commands into <code>UPDATE</code>?</p>
  
  <p>I know this sounds stupid, because why do I make <code>INSERT</code> commands, if I want to <code>UPDATE</code>. Just to make it a clear scenario: another developer gave me the script:)</p>
  
  <p>Thanks in advance,
  Daniel</p>
  
  <p><strong>EDIT</strong> - problem solved</p>
  
  <p>First I created a table and filled it up with my <code>INSERT</code> commands, then I used the following <code>REPLACE</code> command:</p>
  
  <pre><code>REPLACE
      INTO table_1
  SELECT *
      FROM table_2;
  </code></pre>
  
  <p>This can originally be found at: <a href="https://stackoverflow.com/questions/725556/how-can-i-merge-two-mysql-tables">How can I merge two MySQL tables?</a></p>