MySQL SOUNDEX() function
SOUNDEX() function
MySQL SOUNDEX() function returns soundex string of a string.
Soundex is a phonetic algorithm for indexing names after English pronunciation of sound. You can use SUBSTRING() on the result to get a standard soundex string. All nonalphabetic characters in str are ignored. All international alphabetic characters outside the A-Z range are treated as vowels.
Syntax:
SOUNDEX(str)
Argument:
Name | Description |
---|---|
str | A string whose SOUNDEX string is to be retrieved. |
The SOUNDEX() function has following limitations :
- This function, as currently implemented, is intended to work well with strings that are in the English language only. Strings in other languages may not produce reliable results.
- This function is not guaranteed to provide consistent results with strings that use multi-byte character sets, including utf-8.
Syntax Diagram:

MySQL Version: 5.6
Example: MySQL SOUNDEX() function
The following statement returns the SONDEX string of the argument string w3resource. The return value is W6262.
Code:
SELECT SOUNDEX('w3resource');
Sample Output:
mysql> SELECT SOUNDEX('w3resource'); +-----------------------+ | SOUNDEX('w3resource') | +-----------------------+ | W6262 | +-----------------------+ 1 row in set (0.00 sec)
All String Functions
Previous:
RTRIM
Next: SOUNDS_LIKE
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook