Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 859 Bytes

File metadata and controls

35 lines (24 loc) · 859 Bytes
description
Each call returns a random generated number between 0 and 1 for each row.

RANDOM

Syntax

RANDOM() → double

Examples

{% code title="RANDOM example" %}

SELECT RANDOM()
-- 0.24943567857336457

{% endcode %}

RANDOM(seed int32) → double

  • seed: Seed value.

Examples

{% code title="RANDOM example" %}

SELECT RANDOM(4000)
-- 0.18633151868393985

{% endcode %}

Usage Notes

If a seed value is specified, RANDOM generates a unique number for each row. If the same seed is used to call RANDOM on the same row multiple times, the same generated number will be returned each time.