UNIFORM

functionsupportedCore SQL functions

docs.snowflake.com ↗

Data generation functions

Generates a uniformly-distributed pseudo-random number in the inclusive range [min, max].

Syntax

UNIFORM( <min> , <max> , <gen> )

Parameters

NameRequiredDescription
minrequiredA constant specifying the minimum value (inclusive) of the generated number.
maxrequiredA constant specifying the maximum value (inclusive) of the generated number.
genrequiredAn expression that serves as a raw source of uniform random numbers, typically the RANDOM function. For more information, see the Data Generation Functions Usage notes.

Returns

If either or both of min or max is a floating-point number, UNIFORM returns a floating-point number. If both min and max are integers, UNIFORM returns an integer.

Usage notes