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 are the tools for Oracle ?
What privilege is needed for a user to query tables in another schema?
How to check your oracle database 10g xe installation?
What is the difference between translate and replace?
Explain the use of grant option in imp command.
What is an oracle tablespace?
How to use attributes of the implicit cursor in oracle?
How to lock and unlock a user account in oracle?
What is the difference between pre-select and pre-query?
What is a data lock in oracle?
What is an index associated with a constraint?
How do I limit the number of rows returned by an oracle query after ordering?
How do I connect to oracle?
How do I call oracle stored procedures that take no parameters?
Explain the use of analyse option in exp command.