I have this table:
old_id integer NOT NULL,
new_id integer
Now I want to update new_id
with a sequence in such a way that the order of old_id
is preserved. Basically:
update table
set new_id = sequence.NEXTVAL
order by old_id
Is something like this possible? If it matters, I'm on Oracle 10g.