Skip to main content

SOUNDEX

Returns the four-character Soundex code of a string, so that names that sound alike in English, such as Robert and Rupert, can be matched.

See also:
[SELECT] [LOWER]


Syntax​

SELECT SOUNDEX(string) FROM <multipartIdentifier>;

Arguments​

string
A string.

Return Value(s)​

Returns a four-character string, a letter followed by three digits. The result is ?000 for NULL or for a string with no ASCII letters.


Examples​

Compare names by sound​

Robert and Rupert share a code:

SELECT SOUNDEX('Robert') AS a, SOUNDEX('Rupert') AS b, SOUNDEX('Tymczak') AS c;
|------|------|------|
| a | b | c |
|------|------|------|
| R163 | R163 | T522 |
|------|------|------|

For more information, see https://www.sqlite.org/lang_corefunc.html#soundex