Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> dbms_random question
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:
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