MySQL SOUNDS LIKE运算符有什么用?

顾名思义,MySQL SOUNDS LIKE运算符将从表中搜索相似的声音值。它的语法是“ Expression1 SOUNDS LIKE Expression2”,其中,Expression1和Expression2将根据它们的英语发音进行比较。

示例

以下是来自'student_info'表的示例,该示例将基于声音的发音匹配两个表达式-

mysql> Select * from student_info where name sounds like 'grov';
+------+--------+---------+------------+
| id   | Name   | Address | Subject    |
+------+--------+---------+------------+
| 105  | Gaurav | Jaipur  | Literature |
+------+--------+---------+------------+
1 row in set (0.00 sec)

mysql> Select * from student_info where name sounds like 'rmn';
+------+-------+---------+-----------+
| id   | Name  | Address | Subject   |
+------+-------+---------+-----------+
| 125  | Raman | Shimla  | Computers |
+------+-------+---------+-----------+
1 row in set (0.00 sec)
猜你喜欢