Skip to main content
Version: current [25.x]

Categories: Semi-Structured Data

ARRAY_PREPEND

Prepends an element to the beginning of an array.

Syntax

ARRAY_PREPEND(element ANY, array LIST) → LIST

  • element: The element to prepend to the array.
  • array: The array to prepend to.

Examples

ARRAY_PREPEND example
SELECT ARRAY_PREPEND(1, ARRAY[2, 3]);
-- [1, 2, 3]