Mysql SOUNDS LIKE
From w3cyberlearnings
Contents |
MySQL SOUNDS LIKE Function
This function returns a soundex comparison between to expression. If the two expression is had similar soundex key, it returns 1, and otherwise return 0. Check SOUNDEX() function for additional detail abou soundex function.
Syntax SOUNDS LIKE
- expr1: A string input to compare
- expr2: A string input to compare
expr1 SOUNDS LIKE expr2; OR SOUNDEX(expr1) = SOUNDEX(expr2);
Example 1
mysql> SELECT 'Girl' SOUNDS LIKE 'Girl'; +---------------------------+ | 'Girl' SOUNDS LIKE 'Girl' | +---------------------------+ | 1 | +---------------------------+ 1 row in set (0.00 sec)
Example 2
mysql> SELECT 'Girl' SOUNDS LIKE '3irl'; +---------------------------+ | 'Girl' SOUNDS LIKE '3irl' | +---------------------------+ | 0 | +---------------------------+ 1 row in set (0.00 sec)