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
Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?
material view and view disadvantages?
What is oracle rownum?
How many types of synonyms in Oracle?
What to do if the binary spfile is wrong for the default instance?
How to establish administrator authentication to the server?
How to install oracle database 10g xe?
How to turn on or off recycle bin for the instance?
What is meant by a deadlock situation?
What is an oracle user role?
What is parameterized cursor in oracle?
What is meant by joins? List out the types of joins.
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?
Explain parameter file in oracle.
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.