RANDOM function
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Returns a random INTEGER value between two integers (inclusive).
Note: This function returns
a number from a pseudorandom sequence of numbers rather than
a truly random sequence.
The Alternate Random Number Generator (-rand) parameter determines whether the same sequence of random numbers is generated for each session. For information on this parameter, see Startup Command and Parameter Reference.
Syntax
|
- low
- An integer expression that is the lower of the two expressions you are supplying to the RANDOM function. This can be an INT64 value.
- high
- An integer expression that is the higher of the two expressions you are supplying to the RANDOM function. This can be an INT64 value.
Example
Often when you set up a database for testing purposes, you want to generate many records without actually keying in data for each record. The r-random.p procedure generates 10 Order records and a random number of OrderLines for each Order record.
r-random.p
|