# `ASCII`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the ASCII code of the first character of a string. For UTF-8, returns the Unicode code point.

## Syntax

```sql
ascii(<string>)
```

## Arguments

### Required

- `<string>`: The string whose first character code is to be returned.

## Returns

Returns an integer representing the ASCII code or Unicode code point of the first character.

## Examples

### Get ASCII Code

Get the ASCII code of a character.

```sql
SELECT ascii('x') AS result;
```

Returns `120`, the ASCII code for 'x'.

## Related Documentation

- [String Types](/docs/data/data-cloud-query-guide/references/dc-sql-reference/string.md)
