Skip to main content

GET

Returns an element from an array by index (1-based).

Syntax

GET( <array>, <index> )

Aliases

Examples

SELECT GET([1, 2], 2), ARRAY_GET([1, 2], 2);

┌───────────────────────────────────────┐
│ get([1, 2], 2) │ array_get([1, 2], 2)
├────────────────┼──────────────────────┤
22
└───────────────────────────────────────┘
Did this page help you?
Yes
No
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today