random
Return a random number between 0 and 1. Each row gets a new value.
Try an expression
In Formula, enter the expression and set Output type to DOUBLE.
Expression
random()Expected behavior
A number greater than or equal to 0 and less than 1.Its value varies between executions; the example checks its behavior rather than a fixed value.
Arguments and types
random()Supported signatures (1)
random() → DOUBLEThe result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
The result can change each time the expression is evaluated.
Function metadata from DuckDB, used under the MIT license.