Skip Headers

Oracle9i Supplied PL/SQL Packages and Types Reference
Release 2 (9.2)

Part Number A96612-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_RANDOM , 2 of 2


Summary of DBMS_RANDOM Subprograms

Table 48-1 DBMS_RANDOM Package Subprograms
Subprogram Description

INITIALIZE Procedure

Initializes the package with a seed value.

SEED Procedure

Resets the seed.

RANDOM Function

Gets the random number.

TERMINATE Procedure

Closes the package.

INITIALIZE Procedure

To use the package, first call the initialize subprogram with the seed to use.

Syntax

DBMS_RANDOM.INITIALIZE (
   seed  IN  BINARY_INTEGER);

Note:

Use a seed that is sufficiently large, more than 5 digits. A single digit may not return sufficiently random numbers. Also consider getting the seed from variable values such as the time.


Parameters

Table 48-2 INITIALIZE Procedure Parameters
Parameter Description

seed

Seed number used to generate a random number.

SEED Procedure

This procedure resets the seed.

Syntax

DBMS_RANDOM.SEED (
   seed  IN  BINARY_INTEGER);

Parameters

Table 48-3 INITIALIZE Procedure Parameters
Parameter Description

seed

Seed number used to generate a random number.

RANDOM Function

This function gets the random number.

Syntax

DBMS_RANDOM.RANDOM
   RETURN BINARY_INTEGER;

TERMINATE Procedure

When you are finished with the package, call the TERMINATE procedure.

Syntax

DBMS_RANDOM.TERMINATE;

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback