跳到主要内容

ARRAY_INDEXOF

Returns the index(1-based) of an element if the array contains the element.

Syntax

ARRAY_INDEXOF( <array>, <element> )

Examples

SELECT ARRAY_INDEXOF([1, 2, 9], 9);

┌─────────────────────────────┐
│ array_indexof([1, 2, 9], 9)
├─────────────────────────────┤
3
└─────────────────────────────┘
开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册