soundex() function

The soundex() function returns the 4-digit soundex code for a phonetic string expression.




str.exp Specifies the phonetic string expression from which the 4-digit soundex code is returned.
code Provides backward compatibility. Options are:
0 Original census soundex (default).
1 English-language soundex.


The code consists of the first letter of the word, plus values for the next three additional consonants. If there are less than three consonants, 0s are placed in the code.

The codes are values given to consonants. Words with a similar arrangement of consonants have similar codes, regardless of the actual spelling. Also, similar sounding consonants can have the same code.


This outputs "P220".

crt soundex("PICK")