Documentation

    enum_range

    Returns all values of the input enum type as an array.

    Try an expression

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

    Expression

    enum_range(NULL::ENUM('sad', 'ok', 'happy', 'anxious'))

    Result

    '[sad, ok, happy, anxious]'

    The expression returns VARCHAR[]. 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

    enum_range(enum)
    enum
    Any value
    Supported signatures (1)
    enum_range(enum: ANY) → VARCHAR[]

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

    Things to know

    With a missing first argument

    enum_range(NULL::ENUM('sad', 'ok', 'happy', 'anxious'))

    '[sad, ok, happy, anxious]'

    Browse enumsDuckDB documentation

    Function metadata from DuckDB, used under the MIT license.