EDIT_DISTANCE

Purpose

This function defines the Levenshtein distance between two strings, indicating their similarity.

Syntax

edit_distance::=

Usage Notes

  • To check the phonetic equivalence of strings you can use the functions SOUNDEX and COLOGNE_PHONETIC.
  • The number of changes is calculated which need to be done to convert one string into the other.
  • The result is a number between 0 and the length of the wider string.

Example

SELECT EDIT_DISTANCE('schmitt', 'Schmidt');