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
How to assign data of the deleted row to variables?
How to rollback the current transaction in oracle?
WHAT IS ecc 6.0
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.
Explain the use of online redo log files in oracle.
What are set operators?
What is a trigger oracle?
What is oracle open database communication (odbc)?
Her departmandaki isçilerden empno' su ikinci sirada olan isçilerin empno, deptno, hiredate, sira_no bigilerini döndüren sorguyu yaziniz?
If a parameter is used in a query without being previously defined, what diff. exist betw. report 2.0 and 2.5 when the query is applied ?
defination of bitmap index
What is the purpose of tables, private synonyms and public synonyms in Oracle?
How to assign a tablespace to a users in oracle?
What is key preserved table?
How do I manually uninstall oracle client?