Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to generate unique document number ?
Sorry, I mean there should not be any gap.
krislioe_at_gmail.com wrote:
> Hi All,
>
> We need to generate Document Number where there should be any gap, so
> that we cannot use sequence. For example : Invoice Number.
>
> one possible approach like : Select MAX(InvoiceNumber)+1 from invoice,
> what if that table has millions of rows, is this reliable enough ?
> How to avoid two user do the same query at same time that lead to
> dupplicate number ?
>
> Anybody has done it this way in production? or any other approach ?
>
> Thank you for your info,
> xtanto
Received on Tue Sep 12 2006 - 22:35:02 CDT
![]() |
![]() |