> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RAND

> Returns a pseudorandom number whose type depends on the source dialect.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

**Aliases:** [`random`](/query/sql/functions/math/random)

The zero-argument function returns a non-NULL value.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
rand()
```

## Arguments

Takes no arguments.

## Returns

* Type: default: DOUBLE; snowflake: BIGINT
* Possible values: DOUBLE values in \[0, 1) outside Snowflake; the full signed BIGINT range in Snowflake.
* NULL behavior: The zero-argument function returns a non-NULL value.

## Properties

| Property | Value |
| - | - |
| Deterministic | No |
| Supports window usage | No |

## Usage notes

* The function generates a value per row. Repeated evaluations can produce different values.

## Examples

### A variable value

* The source dialect determines the return type.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT rand() AS "value";
```

Variable result: The value changes between evaluations. Outside Snowflake dialect it is a DOUBLE in \[0, 1); in Snowflake dialect it is a signed BIGINT.

## Limitations

* This function takes no arguments. A seed argument is not supported.
* In the Snowflake dialect, the result is BIGINT even when query tools report DOUBLE. Other dialects return DOUBLE.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.