levenshtein
Count the fewest character insertions, deletions and substitutions needed to turn one string into another. Uppercase and lowercase letters count as different.
Also available as editdist3.
Try an expression
In Formula, enter the expression and set Output type to BIGINT.
Expression
levenshtein('duck', 'db')Result
3To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
levenshtein(s1, s2)- s1
- Text
- s2
- Text
Supported signatures (1)
levenshtein(s1: VARCHAR, s2: VARCHAR) → BIGINTThe result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
If the first argument is missing, the result is NULL.
Function metadata from DuckDB, used under the MIT license.