enum_first
Returns the first value of the input enum type.
Try an expression
In Formula, enter the expression and set Output type to VARCHAR.
Expression
enum_first(NULL::ENUM('sad', 'ok', 'happy', 'anxious'))Result
'sad'To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
enum_first(enum)- enum
- Any value
Supported signatures (1)
enum_first(enum: ANY) → VARCHARThe result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
With a missing first argument
enum_first(NULL::ENUM('sad', 'ok', 'happy', 'anxious'))'sad'
Function metadata from DuckDB, used under the MIT license.