RAND[OM]

Purpose

This function generates a random number.

Syntax

random::=

Usage Notes

  • The result is always a DOUBLE.
  • When specifying the optional parameters, a random number within the interval [min,max] is created. Without any parameters this interval is [0,1].

Example

SELECT RANDOM() RANDOM_1, RANDOM(5,20) RANDOM_2;
Result
RANDOM_1 RANDOM_2
0.379277567626116 12.7548096816858