difference

Description

Returns the difference between two soundex values.

Syntax

difference(char_expr1 | uchar_expr1), (char_expr2 | uchar_expr2)

Parameters

char_expr1

is a character-type column name, variable, or constant expression of char, varchar, nchar or nvarchar type.

char_expr2

is another character-type column name, variable, or constant expression of char, varchar, nchar or nvarchar type.

uchar_expr1

is a character-type column name, variable, or constant expression of unichar type.

uchar_expr2

is another character-type column name, variable, or constant expression of unichar type.

Examples

Example 1

select difference("smithers", "smothers")

---------
4

Example 2

select difference("smothers", "brothers")

---------
2

Usage

Standards

SQL92 – Compliance level: Transact-SQL extension.

Permissions

Any user can execute difference.

See also

Functions soundex