levenshtein function

Returns the Levenshtein distance between the strings str1 and str2.

Syntax

levenshtein(str1, str2)

Arguments

  • str1: A STRING expression.

  • str2: A STRING expression.

Returns

An INTEGER.

Examples

> SELECT levenshtein('kitten', 'sitting');
 3