# `ARRAY_LENGTH`

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

Returns the total number of elements in an array.

## Syntax

```sql
array_length(<array>)
```

## Arguments

### Required

- `<array>`: The array to measure.

## Returns

Returns an integer that represents the total number of elements in the array.

## Considerations

- Returns the count of all elements including NULL and duplicate values.
- For an empty array, returns 0.

## Examples

### Count Array Elements

Determine the number of elements in an array.

```sql
SELECT array_length(array[1, 2, 3]) AS element_count;
```

Returns `3`, counting all elements in the array.

## Related Documentation

- [Array Data Type](/docs/data/data-cloud-query-guide/references/dc-sql-reference/array.md)
