DIFFERENCE

The DIFFERENCE function returns a value from 0 to 4 representing the difference between the sounds of two strings based on applying the SOUNDEX function to the strings. A value of 4 is the best possible sound match.

Read syntax diagramSkip visual syntax diagram
>>-DIFFERENCE--(--expression-1--,--expression-2--)-------------><

expression-1
An expression that returns a built-in numeric, character-string, or graphic-string data types, but not CLOBs or DBCLOBs. The arguments cannot be binary strings. A numeric argument is cast to a character string before evaluating the function. For more information about converting numeric to a character string, see VARCHAR.
expression-2
An expression that returns a built-in numeric, character-string, or graphic-string data types, but not CLOBs or DBCLOBs. The arguments cannot be binary strings. A numeric argument is cast to a character string before evaluating the function. For more information about converting numeric to a character string, see VARCHAR.

The data type of the result is INTEGER. If either argument can be null, the result can be null; if either argument is null, the result is the null value.

Examples