Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: random numbers

Re: random numbers

From: <markp7832_at_my-deja.com>
Date: 1999/11/10
Message-ID: <80c3md$56$1@nnrp1.deja.com>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US