Re: PL/SQL - system calls, random numbers and milliseconds

From: Russ Seligman <rseligma_at_oracle.com>
Date: 1995/06/26
Message-ID: <RSELIGMA.95Jun26103546_at_seinfeld.oracle.com>#1/1


In article <3sfelg$mrf_at_darwin.nbnet.nb.ca> iwa_at_csi.nb.ca (Ian Allen) writes:
> Also is it possible to generate random numbers other than using the
> time?

Well, random number functions are deterministic, so if you give it the same seed multiple times, it will always produce the same result. The time (number of seconds since around 1970) is a useful seed because it always changes -- every second, anyway. You can use *any* method to generate a seed, such as the number of rows currently in a specific table, the next number in a sequence, etc. The goal is to find an initial seed that is different from the previous one, so that the random number sequence is also different.

--Russ


Russ Seligman                 "If there's nothing wrong with me, maybe
Oracle Corporation             there's something wrong with the universe."
rseligma_at_us.oracle.com           --Beverly Crusher, ST:TNG
===============================================================================
Received on Mon Jun 26 1995 - 00:00:00 CEST

Original text of this message