title: updating 1 million records in oracle DB as batch of 10k;
body: <p>I have to update a table in oracle db as batch of 10k.</p>
  
  <p>I tried this:</p>
  
  <pre><code>BEGIN
          WHILE (true) LOOP
          UPDATE TOP (10000) CUSTOMERS SET ACTIVE = 'N' WHERE ACTIVE='Y';
          IF sql%notfound THEN
                  EXIT;
          END IF;
          COMMIT;
          END LOOP;
  END;
  </code></pre>
  
  <p>It doesn't works as plsql doesn't support top. </p>
  
  <p>Any suggestions?</p>