be useful for testing purposes. 

These functions produce a random value each time. Each value is independent of
the other values generated by other calls to the function. The underlying
algorithm produces pseudo-random values, and thus the values are not truly
random or independent, but without knowing the algorithm, the values are
essentially unpredictable, usually evenly distributed (if the sample size is
large), and pseudo-independent of each other.

  * Controlled distribution, which can be useful for providing unique ID numbers for records that do not already have unique identifiers. 

These functions produce values that are not independent. For example, the [
NORMAL  ](functions/normal) function returns values that have an approximately
“normal” (bell-shaped) distribution based on a specified mean and standard
deviation. Thus, each new value generated is at least indirectly influenced by
previously generated values as the function tries to maintain the specified
distribution. As another example, the [ SEQ  ](functions/seq1) family of
functions return a sequence of values.

Note

The [ UNIFORM  ](functions/uniform) function is listed as a controlled-
distribution function, but is intended to generate evenly-distributed values.
In other words, it acts as though it’s a “random” function, but we refer to it
as a controlled distribution function because the distribution is explicitly
specified and because you can choose a data-generation function that produces
non-uniform values over a large sample size.

##  List of Functions  ¶

Function Name  |  Notes   
---|---  
**Random** |   
[ RANDOM  ](functions/random) |  Returns a pseudo-random 64-bit integer.   
[ RANDSTR  ](functions/randstr) |  Returns a random string of specified length.   
[ UUID_STRING  ](functions/uuid_string) |  Returns a random RFC 4122-compliant UUID as a formatted string.   
**Controlled Distribution** |   
[ NORMAL  ](functions/normal) |  Returns a normal-distributed floating point number, with specified mean and standard deviation.   
[ UNIFORM  ](functions/uniform) |  Returns a uniformly random number within the specified range.   
[ ZIPF  ](functions/zipf) |  Returns a Zipf-distributed integer.   
[ SEQ1 / SEQ2 / SEQ4 / SEQ8  ](functions/seq1) |  Returns a sequence of monotonically increasing integers.   
  
##  Usage Notes  ¶

  * Random distribution functions are deterministic. 

  * Each random distribution function takes a generator expression, ` _ gen  _ ` , as its last argument. The generator expression, ` _ gen  _ ` , can be constant or variable: 

>     * If constant, then the result of the random distribution function is
> constant (unless there are other, variable arguments, which is currently
> only supported for the [ RANDSTR  ](functions/randstr) function).
>
>     * If variable, then the result of the random distribution function is
> variable.

  * Generator expressions must be a type 64-bit integer, although implicit conversions are allowed. Any expression that can be converted into a 64-bit integer can be used as a generator expression. 

  * The randomness of any random distribution function is directly linked to the randomness of its generator expression. For most practical purposes, the [ RANDOM  ](functions/random) data generation function is the best choice for randomly-generated integer values. 

  * Sequences generated by data generation functions are not guaranteed to be ordered and gap-free. This is because the numbers may be generated in parallel, in an unsynchronized fashion. 

For more details about sequences in Snowflake, see [ Using Sequences
](../user-guide/querying-sequences) .

Was this page helpful?

Yes  No

[ Visit Snowflake ](https://www.snowflake.com)

[ Join the conversation ](https://community.snowflake.com/s/)

[ Develop with Snowflake ](https://developers.snowflake.com)

[ Share your feedback ](/feedback)

[ Read the latest on our blog ](https://www.snowflake.com/blog/)

[ Get your own certification ](https