Documentation

    array_push_front

    Add a value at the beginning of a list.

    Try an expression

    In Formula, enter the expression and set Output type to VARCHAR.

    Expression

    array_push_front([4, 5, 6], 3)

    Result

    '[3, 4, 5, 6]'

    The expression returns INTEGER[]. Formula stores it as VARCHAR in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.

    Arguments and types

    array_push_front(arr, e)
    arr
    Any value
    e
    Any value
    Supported signatures (1)
    array_push_front(arr: ANY, e: ANY)

    The result type can depend on the input types. See DuckDB for the full argument rules.

    Things to know

    With a missing first argument

    array_push_front(NULL::INTEGER[], 3)

    '[3]'

    Browse lists & arraysDuckDB documentation

    Function metadata from DuckDB, used under the MIT license.