Dofactory.com
Dofactory.com
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 freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

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



Last updated on Dec 21, 2023

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 freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.