---
title: uuid function
description: Learn the syntax of the uuid function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/uuid
---

# `uuid` function

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Returns a universally unique identifier [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) string.

A UUID is a 128-bit value used to uniquely identify objects or entities on the Internet. The term "globally unique identifier" (GUID) is also used.
While UUIDs are not guaranteed to be unique, the probability of two UUIDs being the same is so low that they can be considered unique for practical purposes.

## Syntax

```
uuid()
```

## Arguments

The function takes no argument.

## Returns

A `STRING` formatted as a canonical UUID 36-character string.

The function is non-deterministic.

## Examples

```sql
> SELECT uuid();
46707d92-02f4-4817-8116-a4c3b23e6266
```

## Related functions

* [`rand` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/rand.md)
