Documentation

    enum_last

    Returns the last value of the input enum type.

    Try an expression

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

    Expression

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

    Result

    'anxious'

    To use your own data, replace the example values with column names. Keep format strings and other options as written.

    Arguments and types

    enum_last(enum)
    enum
    Any value
    Supported signatures (1)
    enum_last(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_last(NULL::ENUM('sad', 'ok', 'happy', 'anxious'))

    'anxious'

    Browse enumsDuckDB documentation

    Function metadata from DuckDB, used under the MIT license.