> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.firebolt.io/feedback

```json
{
  "path": "/reference-sql/functions-reference/array/index-of",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

> Reference material for INDEX_OF function

# INDEX_OF

Returns the index position of the first occurrence of the element in the array (or `NULL` if not found).

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
INDEX_OF(<array>, <value>)
```

## Parameters

| Parameter | Description                                      | Supported input types                                |
| :-------- | :----------------------------------------------- | :--------------------------------------------------- |
| `<array>` | The array to be analyzed                         | `ARRAY`                                              |
| `<value>` | The element from the array that is to be matched | Any type that corresponds to an element in the array |

## Return Type

`INTEGER`

## Example

The following example returns the index position of the 5 in the `levels` array:

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT
	INDEX_OF([ 1, 3, 4, 5, 7 ], 5) AS levels;
```

**Returns**: `4`
