Skip to main content

uuid function

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime

Returns a universally unique identifier UUID 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