DIFFERENCE function in SQL Server

The DIFFERENCE() function returns an integer after comparing two SOUNDEX values. The integer number, ranging from 0 to 4, indicates the match between the two SOUNDEX values.

0 means that the SOUNDEX values have little or no similarity. 4 implies that the SOUNDEX values are very comparable or same.

Examples:
SELECT DIFFERENCE(‘Not’, ‘Knot’);
Returns- 2

SELECT DIFFERENCE(‘Will’, ‘Bill’);
Returns- 3

SELECT DIFFERENCE(‘Sea’, ‘See’);
Returns- 4

SELECT DIFFERENCE(‘Warn’, ‘Worn’);
Returns- 4

Difference in SQL Server

Hope you find this article helpful.

Please subscribe for more interesting updates.

2 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s