title: Oracle - Merge into, commit after n-rows
body: <p>I know how to commit a simple <strong>UPDATE</strong> statement after n-rows.</p>
  
  <p>How to implement that with a <strong>MERGE INTO</strong> statement, say commit after each 10000 rows:</p>
  
  <pre><code>MERGE INTO incident a
  USING 
  (
  select b.incident_sk incident_sk_bkp , b.mapping_id mapping_id_bkp 
  from incident a
  join  incident_bkp b
  on a.incident_sk=b.incident_sk
  where 1=1
  and a.mapping_id &lt;&gt; b.mapping_id_bkp
  ) b ON (a.mapping_id = b.mapping_id_bkp)
  WHEN MATCHED THEN UPDATE 
      SET a.mapping_id = b.mapping_id_bkp;
  </code></pre>
  
  <p>Additional question: is that necessary for 1,2 million records on some decent hardware?</p>