> ## 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.

# CHAR

> Returns the character for the low eight bits of a nonnegative numeric value.

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

**Aliases:** [`chr`](/query/sql/functions/string/chr)

Returns NULL for NULL input.

## Syntax

### Scalar

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

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE or DECIMAL(p, s) | Yes | The input is converted to BIGINT before selecting its character. For DECIMAL(p, s), p is precision (total digits) and s is scale (digits after the decimal point). |

## Returns

* Type: STRING
* Possible values: A character in Unicode U+0000 through U+00FF; an empty string for negative values.
* NULL behavior: Returns NULL for NULL input.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |

## Usage notes

* Nonnegative input is reduced modulo 256. It does not construct arbitrary Unicode code points.
* INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT char(65) AS letter, char(321) AS wrapped, char(-1) AS negative;
```

| letter | wrapped | negative |
| - | - | - |
| A | A | '' |

### Build a string from character codes

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT concat(char(72), char(105)) AS greeting;
```

| greeting |
| - |
| Hi |


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