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

# `xxhash64` 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 64-bit hash value of the arguments.

## Syntax

```
xxhash64(expr1 [, ...] )
```

## Arguments

* `exprN`: An expression of any type.

## Returns

A BIGINT.

> [!NOTE]
>
> The hash value depends on the input data type. For example, `xxhash64(1::INT)` produces a different result than `hash(1::BIGINT)`. If your use case requires stable hash values across different data types, consider explicitly casting values to the desired type.

## Examples

```sql
> SELECT xxhash64('Spark', array(123), 2);
 5602566077635097486
```

## Related functions

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