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


Please Help Members By Posting Answers For Below Questions

What is the difference between formal parameters and actual parameters?

753


Explain parameter file in oracle.

788


Explain database link?

877


What are the differences between char and nchar in oracle?

837


What is the use of oracle?

792


When do I need to use a semicolon vs a slash in oracle sql?

820


State all possible different index configurations a table can possibly have?

784


Explain what does a control file contain?

825


Explain the blob datatype?

810


What privilege is needed for a user to connect to oracle server?

770


Explain the use of log option in exp command.

757


How to establish administrator authentication to the server?

788


What is the usage of save points in oracle database?

744


Explain about achiever in sql?

803


What is tns entry?

811