Skip to main content

UNNEST

Unnests the array and returns the set of elements.

Syntax

UNNEST( <array> )

Examples

SELECT UNNEST([1, 2]);

┌─────────────────┐
│ unnest([1, 2])
├─────────────────┤
1
2
└─────────────────┘

-- UNNEST(array) can be used as a table function.
SELECT * FROM UNNEST([1, 2]);

┌─────────────────┐
value
├─────────────────┤
1
2
└─────────────────┘
Did this page help you?
Yes
No
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today