Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to increased by exactly 1 ?
> The system need to auto generate the Control Code column for the items.
> The
> business rule is that the system should have an option to assign the
> lowest
> next available Control Code for the new item created.
Is it so neccessary to follow to business rule literally ? Look then...
I advise you to discuss this problem with the person that define that business rule.
The are no good efficient scalable solution in this case...
In fact, you must create some semaphore to serialize access
to your ControlCodeCounter. You can use for
that purpose DBMS_LOCK package,
or use SELECT FOR UPDATE statement
In any case, it will work only if just few person simultaneously add items... Received on Fri Jan 21 2005 - 12:33:10 CST
![]() |
![]() |