Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”
What do you mean exactly ? Do you mean you want to have 1 come up as part of the (infinite) range of possibilities of decimal numbers that exist between 0 and 1 ? I imagine both 0 and 1 are possible return values, but you are extremely unlikely to see either of them because there are so many alternatives.
Or do you mean you want a random number that should be either 0 or 1 ? If the latter, select a range between 1 and 10 for the random number and truncate it to convert it to an integer. Then apply MOD(,2) so that you only get either 0 or 1 e.g.
select mod(trunc((dbms_random.value(1,10))),2) from dual
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.