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

Home -> Community -> Usenet -> c.d.o.misc -> dbms_random question

dbms_random question

From: Pavel Vetesnik <Pavel.Vet_at_volny.cz>
Date: Thu, 22 May 2003 14:45:28 +0200
Message-ID: <baigpb$2e53$1@ns.felk.cvut.cz>


Hello,

I want to generate a random number (to create an unique password). I thought, the dbms_random package was created for this purpouse.

I use such code:



nMagic NUMBER(11);

dbms_random.initialize(5);
nMagic:=dbms_random.random;
dbms_random.terminate;


But I always get the same number (1034085445 in this case)! Giving different 'seed' parameter (5 above), I can get different numbers, but the same 'seed' means the same number. So what that means? To create a random number I must pass a random number to the generator?!

Please can you help me with this?
Thank you in advance,
Pavel Received on Thu May 22 2003 - 07:45:28 CDT

Original text of this message

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