Categories: Data Generation
RANDOM
Each call returns a random generated number between 0 and 1 for each row.
Syntax
RANDOM() → double
Examples
RANDOM exampleSELECT RANDOM()
-- 0.24943567857336457
RANDOM(seed int32) → double
- seed: Seed value.
Examples
RANDOM exampleSELECT RANDOM(4000)
-- 0.18633151868393985
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.
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.