title: SQL access query- Update row if exists, insert if does not
body: <p>I need to write an SQL query for MS Access 2000 so that a row is updated if it exists, but inserted if it does not.</p>
  
  <p>i.e.</p>
  
  <p>If row exists...</p>
  
  <pre><code>UPDATE Table1 SET (...) WHERE Column1='SomeValue' 
  </code></pre>
  
  <p>If it does not exist...</p>
  
  <pre><code>INSERT INTO Table1 VALUES (...) 
  </code></pre>
  
  <p>Can this be done in one query?</p>
  
  <p>(The ON <a href="http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html">DUPLICATE KEY UPDATE method</a> that works in MySQL doesn't seem to work here.)</p>