---
schema_version: "1"
id: 168eb5bf19cb04461c8114474349af0d96a0ac8b8977942c7442c28cd3ac8e50
title: LENGTH
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/scalar-func/string-func/length.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/length.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: cf9ef101bd6121a27691321c1fd908ce201be9225c56f069b4d8cd084d6ae675
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# `LENGTH`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the number of characters in a string.

## Syntax

```sql
length(<string>)
```

## Arguments

### Required

- `<string>`: The string to measure.

## Returns

Returns an integer that represents the number of characters.

## Considerations

- Equivalent to `char_length` and `character_length`.
- Counts characters, not bytes.

## Examples

### Get String Length

Count characters in a string.

```sql
SELECT length('jose') AS result;
```

Returns `4`.

## Related Documentation

- [String Types](https://developer.salesforce.com/docs/data/data-cloud-query-guide/datatype/string.md)
