levenshtein
The levenshtein function is used to return the Levenshtein distance between two strings. For example, levenshtein('kitten','sitting') = 3.
The Levenshtein distance is a type of edit distance. It refers to the minimum number of single-character edits required to change one string into the other.
Syntax
levenshtein(string A, string B)
Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| A, B | Yes | STRING | The strings required for calculating the Levenshtein distance. |
Return Values
Returns a value of type INT.
Example Code
Returns 3.
SELECT levenshtein('kitten','sitting'); What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot