Skip to main content

Categories: Datatype

SIZE

Returns the number of entries in a map or elements in an array. Returns -1 for NULL input instead of NULL.

Syntax​

SIZE(input map or array) → int​

  • input: A map or array expression for which to return the number of entries or elements.

Examples

SIZE example
SELECT SIZE(properties)
-- 3
-- 2
SIZE of an array
SELECT SIZE(ARRAY[1, 2, 3])
-- 3