A SOUNDS
predicate is used to perform a phonetic comparison.Syntax
<sound_predicate> ::= <expression> [NOT] SOUNDS [LIKE] <expression>
expressionExplanation
Specifying LIKE in the SOUNDS predicate has no effect.
The values in the expressions must be alphanumeric
(code attribute ASCII, EBCDIC, see code tables).A phonetic comparison between values is carried out according to the SOUNDEX algorithm. First, all vowels and some consonants are eliminated, then all consonants which are similar in sound are mapped to each other.
x [NOT] SOUNDS [LIKE] y
Result of the predicate | |
x or y is the NULL value |
x SOUNDS y is undefined |
x and y are non-NULL values |
x SOUNDS y is true or false |
x and y are phonetically identical |
x SOUNDS y is true |
x NOT SOUNDS y
has the same result as NOT (x SOUNDS y) .
See also:
SOUNDEX(x) string function