Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: random numbers
In article <80bfph$hnq$1_at_nnrp1.deja.com>,
marcus_chan_at_my-deja.com wrote:
> Hello,
>
> Does Oracle provides function "random generation of unique numbers"?
> thanks
>
> marcus
>
1) Oracle provides a sequence generator to produce a series of numeric
non-repeating values usually used as primary keys. See SQL manual for
create sequence, and the application developers guide for usage
instructions. (After exhausting the series you can set it to cycle
through the range again or to issue an error)
2) Starting with version 8 there is a dbms_random package to provide
random numbers, but uniqueness can not be guarenteed for random numbers
since they are random and a duplicate will eventually appear.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Nov 10 1999 - 00:00:00 CST