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

Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?

614


material view and view disadvantages?

637


What is oracle rownum?

522


How many types of synonyms in Oracle?

601


What to do if the binary spfile is wrong for the default instance?

565






How to establish administrator authentication to the server?

560


How to install oracle database 10g xe?

566


How to turn on or off recycle bin for the instance?

611


What is meant by a deadlock situation?

577


What is an oracle user role?

570


What is parameterized cursor in oracle?

579


What is meant by joins? List out the types of joins.

528


How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

1808


Explain parameter file in oracle.

580


HI Friends Myself Manoj,i am from bengaluru.i have 1 yr of exp in PLSQL but not upto the mark..now attending interviews but m not able to clear even 1 round..i have attended 3 interviews till today.purpose of writing this query is,i want to know the intreview topics that interviewer going to ask frequently,mainly SCENARIO based questions.IF anybody have any PLSQL projects please give it to me,it will helps me alot.Thanks for your patience.

998