how to genarate random numbers in oracle for particular row?
Answer Posted / tanoy guhasarkar
the DBMS_RANDOM package provides a built-in random number
generator utility.
Using In Side A Block:--
DECLARE
my_random BINARY_INTEGER;
BEGIN
my_random := DBMS_RANDOM.RANDOM;
dbms_output.put_line(my_random);
end ;
Executing This Code, We Will Get A Random Number Every Time...
In Side A Select Statement :--
select DBMS_RANDOM.RANDOM from dual;
Note:--
This DBMS_RANDOM package included in oracle after oracle 8.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is an oracle and why it is used?
What is the effect of setting the value "all_rows" for optimizer_goal parameter of the alter session command? What are the factors that affect optimizer in choosing an optimization approach?
Can we save images in a database and if yes, how?
How to change program global area (pga) in oracle?
How to invoke the data pump export utility?
what happened to the global index when I truncate the data in one of the partition?
How to convert characters to numbers in oracle?
What is oracle database client?
What is merge in oracle?
What is a data dictionary and how can it be created?
When system tablespace is created?
What is bulk load in oracle?
Is the After report trigger fired if the report execution fails ?
normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi
What is index in Oracle?