---
schema_version: "1"
id: 7b648da60cf718a9b9a302ad2e295b89ed339577f570d2598c645d635dd3b3eb
title: Array Element Access ([])
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/array-func/array-subscript.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/array-subscript.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3eadd9cf3a3db5e98a8bccd133ca058452f14bafaca9c172ee7879b52b30a78d
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# Array Element Access (`[]`)

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the element at a specified index position in an array.

## Syntax

```sql
(<array>)[<index>]
```

## Arguments

### Required

- `<array>`: The array to access.
- `<index>`: The 1-based position of the element to retrieve.

## Returns

Returns the value at the specified index position.

## Considerations

- Array indices are 1-based.
- Accessing an index outside the array bounds returns NULL rather than throwing an error.

## Examples

### Access First Element

Retrieve the first element from an array.

```sql
SELECT (ARRAY[1, 2, 3])[1] AS first_element;
```

Returns `1`, the element at index position 1.

## Related Documentation

- [Array Data Type](https://developer.salesforce.com/docs/data/data-cloud-query-guide/datatype/array.md)
