What is the possibility of obtaining the same repeated random number?

I would like to generate a random number of 5 digits;

Select round (dbms_random.value (10, 999990)) twice;

The query above seems pretty good, but what is the possibility of obtaining the same repeated random number? I'm fine with repetition until it spreads not less than a second. Is there such a guarantee?

Thank you
VINET

983902 wrote:
I would like to generate a random number of 5 digits;

Select round (dbms_random.value (10, 999990)) twice;

On my laptop, I can call trunc (dbms_random.value (0,100000))-which allows a random number to range form 0 to 99 000 - 100 000 times per second. The probability of repetition in a second depends on the number of calls per second, but in my case that the worst cases are a value that appeared 8 times and 18 445 values appeared twice.

From what you have said so far, I'd probably use a column of date and a sequence in a column number (10) - possibly with a separate strain by table - for a high volume system.

Concerning
Jonathan Lewis

Tags: Database

Similar Questions

Maybe you are looking for