Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Updating a large table (Recursively?)
On Thu, 13 Aug 1998 00:03:13 GMT, staylor_at_petrolsoft.com
wrote:
> So, my questions is this: What would be the simplest way to do this? We
>decided that inserting and deleting rows is not an option. It has to be done
>with UPDATE.
I probably don't want to know why<g>. Have you thought of this:
Say you have 15 rows, and you need to "delete" number 5.
--Temporarily move row 5 past the end.
update your_table
set ordindex = 16
where ordindex = 5;
--Now ripple everything done one row. Your unused row 5
--will now be #15.
update your_table
set ordindex = ordindex -1
where ordindex > 5;
update your_table
set numorders = 14;
Will that work? On the surface, it seems that it would.
Jonathan Received on Thu Aug 13 1998 - 21:52:25 CDT
![]() |
![]() |