translate()

Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.

Reference: DuckDB 2.0.0

Arguments & returns

translate(string, from, to)

Scalar
Overload link stringfromto Returns
#01 VARCHARVARCHARVARCHAR VARCHAR

Example

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

Engine example · Run to view results.