Random
The Random()
generates a random number.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a random integral number between 0 or a specified minimum value, and a maximum value.
Returns Invalid expression
if one of the parameter values is not a valid number, or is a negative number, or when a maximum value is 0, or when the maximum value is less than the specified minimum value or 0 when only the maximum is specified.
As of version 4.2, the Random function also accepts negative numbers when both min and max values are provided - just as long as min < max.
Syntax
Parameters
Name
Type
Required
Description
max_num
numeric
☑️
the maximum value of the generated number.
min_num
numeric
the minimum value of the generated number.
Last updated