Name
SOUNDEX()
Synopsis
SOUNDEX(string
)
This function returns the results of a classic algorithm that can be used to compare two similar strings. Here is an example:
SELECT IF(SOUNDEX('him') = SOUNDEX('hymm'), 'Sounds Alike', 'Does not sound alike') AS 'Sound Comparison'; +------------------+ | Sound Comparison | +------------------+ | Sounds Alike | +------------------+
SOUNDEX()
was designed to allow
comparisons between fuzzy inputs, but it’s rarely used.
Get MySQL in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.