📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

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 │ └───────────────────────────────────────┘

Was this page helpful?