SOUNDEX(x) is a string function that converts a character string x (string specification) to a format that is generated by the SOUNDEX algorithm. Only expressions that have an alphanumeric value as a result are allowed as a string specification (string spec).

This representation can be used if the user does not know the exact spelling of the search term.

Result of the SOUNDEX(x) Function


The SOUNDEX algorithm is used. The result is a value with the data type CHAR(4).

x is a NULL value

NULL value

The SOUNDS predicate is often applied to a column x.

Since inversions cannot be used here, it is advisable for performance reasons to define an additional table column x1 with the data type CHAR(4), in which the result of SOUNDEX(x) is then inserted.

An SQL statement should then refer to column x1:
Instead of
x SOUNDS LIKE <string literal>,
x1= SOUNDEX(<string_literal>)