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

# ASCII

> Returns the Unicode code point of the first character in a string.

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

Returns NULL for NULL input.

## Syntax

### Scalar

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

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | STRING | Yes | The string to inspect. |

## Returns

* Type: INT
* Possible values: The first Unicode scalar value as an integer; zero for an empty string.
* NULL behavior: Returns NULL for NULL input.

## Properties

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

## Usage notes

* Non-ASCII Unicode characters are supported despite the function’s name.

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT ascii('abc') AS ascii_character, ascii('🚀') AS unicode_character, ascii('') AS empty_value;
```

| ascii\_character | unicode\_character | empty\_value |
| - | - | - |
| 97 | 128640 | 0 |

### Leading character only

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT ascii('Zoo') AS uppercase_z, ascii('zoo') AS lowercase_z;
```

| uppercase\_z | lowercase\_z |
| - | - |
| 90 | 122 |


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