Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime
Returns a random value between 0 and 1. This function is a synonym for rand function.
Syntax
random( [ seed ] )
Arguments
seed: An optionalINTEGERliteral.
Returns
A DOUBLE.
The function generates pseudo random results with independent and identically distributed uniformly distributed values in [0, 1).
This function is non-deterministic.
Examples
> SELECT random();
0.9629742951434543
> SELECT random(0);
0.8446490682263027
> SELECT random(null);
0.8446490682263027