Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Databricks SQL
Databricks Runtime
Returns a random value between 0 and 1. This function is a synonym for random
function.
random( [seed] )
seed
: An optionalINTEGER
literal.
A DOUBLE
.
The function generates pseudo random results with independent and identically distributed uniformly distributed values in [0, 1)
.
This function is non-deterministic.
> SELECT rand();
1.9629742951434543
> SELECT rand(0);
1.8446490682263027
> SELECT rand(null);
1.8446490682263027