Link to home
Start Free TrialLog in
Avatar of adnant
adnant

asked on

random number generate on oracle

hi,
i want to generate random number on oracle.
we can generate random numbers by using dbms_random.random function.
and that works on sql/plus but it fails on developer/2000
how can we use this function on developer/2000
is there any another way to generate random numbers?

Avatar of crsankar
crsankar
Flag of United States of America image

Write a stored function which will call dbms_random and return the value generated then call the stored function from within developer. This will work.
You have to create the function and store it in the database for this to work (Stored function).
Avatar of adnant
adnant

ASKER

i want to a function which is generate a random function.
because dbms.random isnt working on developer/2000
Avatar of adnant

ASKER

i want to a function which is generate a random number which is 8 and 6 digit.
because dbms.random isnt working on developer/2000
Hi adnat,

What is the range of random numbers that you want to generate ?
Avatar of adnant

ASKER

the range of random number is 100000-999999 and
10000000-99999999
ASKER CERTIFIED SOLUTION
Avatar of sganta
sganta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial