Documentation

    enum_range_boundary

    Returns the range between the two given enum values as an array. The values must be of the same enum type. When the first parameter is NULL, the result starts with the first value of the enum type. When the second parameter is NULL, the result ends with the last value of the enum type.

    Try an expression

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

    Expression

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

    Result

    '[sad, ok, happy]'

    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_boundary(start, end)
    start
    Any value
    end
    Any value
    Supported signatures (1)
    enum_range_boundary(start: ANY, end: 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_boundary(NULL::"NULL", 'happy'::ENUM('sad', 'ok', 'happy', 'anxious'))

    '[sad, ok, happy]'

    Browse enumsDuckDB documentation

    Function metadata from DuckDB, used under the MIT license.