Text & patterns
Scalar
decode()
Converts blob to VARCHAR. Invalid UTF-8 is handled based on the error behavior argument. Can be 'strict' (default, fail), 'replace' to replace invalid characters with '?', or 'ignore' to skip invalid characters.
Reference: DuckDB 2.0.0
Arguments & returns
2 overloadsdecode(blob)
Scalar
| Overload link | blob |
Returns |
|---|---|---|
| #01 | BLOB |
VARCHAR |
decode(blob, error_option)
Scalar
| Overload link | blob | error_option |
Returns |
|---|---|---|---|
| #02 | BLOB | VARCHAR |
VARCHAR |
Example
2 more βHaybarn WASM 2.0.0-rc12 Β· In your browser
Engine example Β· Run to view results.
More examples
Haybarn WASM 2.0.0-rc12 Β· In your browser
Engine example Β· Run to view results.
Haybarn WASM 2.0.0-rc12 Β· In your browser
Engine example Β· Run to view results.
In other engines
Snowflakebase64_decode_string()
SELECT BASE64_DECODE_STRING('U25vd2ZsYWtl')
SELECT DECODE(FROM_BASE64('U25vd2ZsYWtl'))