Select*fromstudent_infowherenamesoundslike'grov';+------+-------"/> Select*fromstudent_infowherenamesoundslike'grov';+------+-------">

Home >Database >Mysql Tutorial >What is the use of the MySQL SOUNDS LIKE operator?

What is the use of the MySQL SOUNDS LIKE operator?

王林
王林forward
2023-09-09 10:21:031266browse

MySQL SOUNDS LIKE 运算符有什么用?

As the name suggests, the MySQL SOUNDS LIKE operator will search a table for similar sound values. The syntax is "Expression1 SOUNDS LIKE Expression2" where Expression1 and Expression2 are compared based on the English pronunciation of their sounds.

Example

The following is an example from the "student_info" table that will match two expressions based on the pronunciation of a sound -

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)

The above is the detailed content of What is the use of the MySQL SOUNDS LIKE operator?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete