union_extract()

Extract the value with the named tags from the union. NULL if the tag is not currently selected

Reference: DuckDB 1.3.2

Arguments & returns

union_extract(union, tag)

Scalar
Overload link uniontag Returns
#01 UNIONVARCHAR ANY

Example

union_extract example
SQL
Haybarn WASM 2.0.0-rc12 · In your browser

Guide example · Run to view results.

Catalog examples

SELECT
  union_extract(s, 'k');