Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

SQL DIFFERENCE Function

DIFFERENCE returns the SOUNDEX difference between two strings.

SOUNDEX refers to how a string sounds when spoken in English.

The returned values range from 0 (no similarity) to 4 (identical sounding).

Example

#

This example returns the SOUNDEX difference between two words.

SELECT DIFFERENCE('Read', 'Red') AS Difference
Result:  1 record
Difference
4

Note: A 4 indicates that the words sound similar or identical.

Syntax

Syntax of the DIFFERENCE function.

DIFFERENCE(string1, string2)

More Examples

DIFFERENCE with very different words

Problem: Measure the SOUNDEX difference between two very different strings.
SELECT DIFFERENCE('Query', 'Language') AS Difference
Result:  1 record
Difference
0

You may also like



Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

Guides


vsn 3.1