| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> Re: How to fill empty column with number sequence?
You can create a temporary trigger that fires on updates. It will be
somewhat similar to your insert trigger, e.g.
if (:new.id = -1) then
:new.id := seq_name_at_nextval;
Then, just update your whole table:
update tablename
set id = -1;
Remove the temporary update trigger after that. Received on Fri Feb 13 2004 - 13:22:36 CST
![]() |
![]() |