mod(abs(dbms_random.random),50000)+1 : DBMS_RANDOM « System Packages « Oracle PL / SQL






mod(abs(dbms_random.random),50000)+1

   
SQL>
SQL> create table random ( x int );

Table created.

SQL>
SQL> begin
  2          for i in 1 .. 100000
  3          loop
  4                  insert into random values
  5                  ( mod(abs(dbms_random.random),50000)+1 );
  6          end loop;
  7  end;
  8  /

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL>
SQL> drop table random;

Table dropped.

SQL> --

   
    
  








Related examples in the same category

1.ROUND a DBMS_RANDOM.VALUE
2.This script illustrates the use of the DBMS_RANDOM package.
3.Call dbms_random.normal to get a random number
4.Use dbms_random.string to create random string
5.dbms_random.value
6.Random string with dbms_random.string
7.Seed a random value with dbms_random.seed
8.Round a random value from dbms_random.value
9.trunc a random value from dbms_random.value
10.Insert random numbers into a table
11.Insert random value to table