Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこのテーブルを持っています:
old_id integer NOT NULL, new_id integer
new_idここで、順序が保持されるような方法でシーケンスを更新したいと考えてold_idいます。基本的:
new_id
old_id
update table set new_id = sequence.NEXTVAL order by old_id
このようなことは可能ですか?問題があれば、私は Oracle 10g を使用しています。
update (select * from mytable order by old_id) set new_id = mysequence.nextval;