Compares two strings, evaluates the similarity between them, and returns a value from 0 to 4. The best match is 4.
DIFFERENCE ( string-expression1, string-expression2 )
string-expression1 The first string to compare.
string-expression2 The second string to compare.
The following statement returns the value 4:
SELECT DIFFERENCE( 'Smith', 'Smith' ) FROM iq_dummy
The following statement returns the value 4:
SELECT DIFFERENCE( 'Smith', 'Smyth' ) FROM iq_dummy
The following statement returns the value 3:
SELECT DIFFERENCE( 'Smith', 'Sweeney' ) FROM iq_dummy
The following statement returns the value 2:
SELECT DIFFERENCE( 'Smith', 'Jones' ) FROM iq_dummy
The following statement returns the value 1:
SELECT DIFFERENCE( 'Smith', 'Rubin' ) FROM iq_dummy
The following statement returns the value 0:
SELECT DIFFERENCE( 'Smith', 'Wilkins' ) FROM iq_dummy