title: How to force sequence of updates in DB
body: <p>I have this table:</p>
  
  <pre><code>old_id integer NOT NULL,
  new_id integer
  </code></pre>
  
  <p>Now I want to update <code>new_id</code> with a sequence in such a way that the order of <code>old_id</code> is preserved. Basically:</p>
  
  <pre><code>update table
  set new_id = sequence.NEXTVAL
  order by old_id
  </code></pre>
  
  <p>Is something like this possible? If it matters, I'm on Oracle 10g.</p>