Soundex is nothing but same number of characters in the SOUNDEX values. DIFFERENCE can return from 0 to 4. 0 means little or no similarity and 4 means strong similarity or identical values.
Syntax of DIFFERENCE Function :
DIFFERENCE (character_expression1 ,character_expression2)
character_expression1 is a string of type char or varchar.
character_expression2 is a string of type char or varchar.
It returns an integer value.
Examples of DIFFERENCE Function :
Example 1 : Use of DIFFERENCE function in select clause
SELECT DIFFERENCE('Syntax','Syntax-Example')
Output
4
Above example compares soundex value of 2 strings 'Syntax' and 'Syntax-Example' and returns difference of it.