|
|
soundex - Mysql
|
Views : 296
|
|
Tagged in : Mysql
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Soundex is a really cool, and very often overlooked feature of a ton of different programming languages
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');
-> 'H400'
mysql> SELECT SOUNDEX('Quadratically');
-> 'Q36324'
mysql> select uname,title from slideshow where soundex(title) like soundex("aisha takia");
+----------+--------------+
| uname | title |
+----------+--------------+
| raven | Ayesha-Takia |
| dvvel | Ayesha-Takia |
| kalai111 | Ayesha-Takia |
| sanjesh | Ayesha-takia |
| nirmala | Ajay-Jadeja- |
| menaka | Ayesha-takia |
| kalai111 | Ayesha-takia |
+----------+--------------+
7 rows in set (0.01 sec)
This function is used to return search string with similar pronunciation.
|
|
By kalai, On - 2010-01-11 |
|
|
|