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

# `chr` 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 the character at the supplied UTF-16 code point. This function is a synonym for [`char` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/char.md).

## Syntax

```
chr(expr)
```

## Arguments

* `expr`: An expression that evaluates to an integral numeric.

## Returns

The result type is STRING.

If the argument is less than 0, an empty string is returned.
If the argument is larger than `255`, it is treated as modulo 256.
This implies `char` covers the ASCII and Latin-1 Supplement range of UTF-16.

## Examples

```sql
> SELECT chr(65);
 A
```

## Related functions

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