trunc a random value from dbms_random.value : DBMS_RANDOM « System Packages « Oracle PL / SQL






trunc a random value from dbms_random.value

   
SQL>
SQL>  begin
  2        for i in 1 .. 10 loop
  3          dbms_output.put_line( trunc( dbms_random.value( 1, 101 ) ) );
  4        end loop;
  5      end;
  6      /
15
17
28
52
25
19
55
35
18
48

PL/SQL procedure successfully completed.

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.mod(abs(dbms_random.random),50000)+1
10.Insert random numbers into a table
11.Insert random value to table