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 the difference between formal parameters and actual parameters?
Explain parameter file in oracle.
Explain database link?
What are the differences between char and nchar in oracle?
What is the use of oracle?
When do I need to use a semicolon vs a slash in oracle sql?
State all possible different index configurations a table can possibly have?
Explain what does a control file contain?
Explain the blob datatype?
What privilege is needed for a user to connect to oracle server?
Explain the use of log option in exp command.
How to establish administrator authentication to the server?
What is the usage of save points in oracle database?
Explain about achiever in sql?
What is tns entry?