Mysql - How to use soundex function in mysql, Returns a soundex string

How to use soundex function in mysql



SOUNDEX(str)

Returns a soundex string from str. Two strings that sound almost the same should have identical soundex strings. A standard soundex string is 4 characters long, but the SOUNDEX() function returns an arbitrarily long string. You can use SUBSTRING() on the result to get a standard soundex string. All non-alphanumeric characters are ignored in the given string. All international alpha characters outside the A-Z range are treated as vowels:

mysql> SELECT SOUNDEX('Hello');

mysql> SELECT SOUNDEX('Quadratically');

mysql> select id,item from product where soundex(item) like soundex("masala");

+------+--------------+
| id   |  item        |
+------+--------------+
| 1    | Asli masala  |
| 2    | Graram-Takia |
| 3    | mirchi malal |
| 4    | aloo masal   |
| 5    | masla        |
| 6    | sambar masal |
+------+--------------+
7 rows in set (0.01 sec)

This function is used to return search string with similar pronunciation.

The topic on Mysql - How to use soundex function in mysql is posted by - Maha

Hope you have enjoyed, Mysql - How to use soundex function in mysqlThanks for your time

Tech Bluff