DIFFERENCE function [String]

Returns the difference in the SOUNDEX values between the two string expressions.

Syntax
DIFFERENCE ( string-expression-1, string-expression-2  )
Parameters
  • string-expression-1   The first SOUNDEX argument.

  • string-expression-2   The second SOUNDEX argument.

Returns

SMALLINT

Remarks

The DIFFERENCE function compares the SOUNDEX values of two strings and evaluates the similarity between them, returning a value from 0 through 4, where 4 is the best match.

This function always returns some value. The result is NULL only if one of the arguments are NULL.

See also
Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following statement returns the value 3.

SELECT DIFFERENCE( 'test', 'chest' );