title: Replace Into Query Syntax
body: <p>I want to be able to update a table of the same schema using a "replace into" statement.  In the end, I need to be able to update a large table with values that may have changed.</p>
  
  <p>Here is the query I am using to start off:</p>
  
  <pre><code>REPLACE INTO table_name
  (visual, inspection_status, inspector_name, gelpak_name, gelpak_location),
  VALUES (3, 'Partially Inspected', 'Me', 'GP1234', 'A01');
  </code></pre>
  
  <p>What I don't understand is how does the database engine know what is a duplicate row and what isn't?  This data is extremely important and I can't risk the data being corrupted.  Is it as simple as "if all columns listed have the same value, it is a duplicate row"?</p>
  
  <p>I am just trying to figure out an efficient way of doing this so I can update > 45,000 rows in under a minute.</p>